Skip to content

test(enforcement): behavioral proof for ENFORCE_SIGNAL gate promotion#215

Merged
ErenAri merged 1 commit into
mainfrom
test/signal-fallback-behavioral-proof
Jun 3, 2026
Merged

test(enforcement): behavioral proof for ENFORCE_SIGNAL gate promotion#215
ErenAri merged 1 commit into
mainfrom
test/signal-fallback-behavioral-proof

Conversation

@ErenAri

@ErenAri ErenAri commented Jun 3, 2026

Copy link
Copy Markdown
Owner

What

Closes the one remaining Tier-3 validation gap. Gate promotion (#214) and the signal-fallback arms (#212) were unit- and load-tested, but the end-to-end no-BPF-LSM enforcement behavior had no behavioral test.

tests/enforcement/signal_fallback_proof.sh exercises the agent's real no-BPF-LSM code path on any kernel via the AEGIS_LSM_PATH test seam (kernel_features.cpp reads it instead of /sys/kernel/security/lsm). The agent then believes BPF-LSM is absent and attaches only the tracepoints — exactly what happens on a genuinely no-BPF-LSM kernel. The tracepoint + bpf_send_signal mechanism is kernel-version-independent.

Asserts (end-to-end)

  • Gate promotes: runtime_state == ENFORCE_SIGNAL, audit_only == false
  • No-Pretend: enforce_capable == false (the BPF_LSM_DISABLED blocker is still reported)
  • Enforcement fires: a denied open() from a non-exempt cgroup is killed by a signal (exit > 128). Without the signal the open would succeed (no LSM -EPERM on this path), so a signal-kill is unambiguous proof.

Verified locally (6.17)

PASS gate promoted to ENFORCE_SIGNAL
PASS audit_only=false (enforcing, not degraded)
PASS No-Pretend: enforce_capable=false (BPF_LSM_DISABLED honest)
PASS denied open killed by signal (exit=143)
signal-fallback proof: ALL PASS

Wired into kernel-matrix.yml (runs on every matrix kernel; exit 77 = honestly skipped when not root / no systemd-run). GUARANTEES.md updated — gate-promotion behavior is now behaviorally proven, not a follow-up.

🤖 Generated with Claude Code

Closes the one remaining Tier-3 validation gap. The gate promotion (#214)
and the file/net signal-fallback arms (#212) were unit- and load-tested,
but the end-to-end no-BPF-LSM enforcement behavior had no behavioral test
(it nominally needed a no-BPF-LSM kernel).

tests/enforcement/signal_fallback_proof.sh exercises the agent's REAL
no-BPF-LSM code path on any kernel via the AEGIS_LSM_PATH test seam
(kernel_features.cpp reads it instead of /sys/kernel/security/lsm). The
agent then believes BPF-LSM is absent and attaches ONLY the tracepoints
— exactly what happens on a genuinely no-BPF-LSM kernel; the
tracepoint+bpf_send_signal mechanism is kernel-version-independent.

Asserts end-to-end:
  - gate promotes: runtime_state == ENFORCE_SIGNAL, audit_only == false
  - No-Pretend: enforce_capable == false (BPF_LSM_DISABLED still reported)
  - enforcement fires: a denied open() from a non-exempt cgroup is killed
    by a signal (exit > 128). Without the signal the open would SUCCEED
    (no LSM -EPERM on this path), so a signal-kill is unambiguous proof.

Verified locally on 6.17: all 4 assertions PASS (ENFORCE_SIGNAL posture,
honest capability report, denied open killed exit=143). Wired into
kernel-matrix.yml so it runs on every matrix kernel (exit 77 = skipped
when not root / no systemd-run). GUARANTEES.md updated: the gate-promotion
behavior is now behaviorally proven, not a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ErenAri ErenAri merged commit d6ad570 into main Jun 3, 2026
30 checks passed
@ErenAri ErenAri deleted the test/signal-fallback-behavioral-proof branch June 3, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant