test(enforcement): behavioral proof for ENFORCE_SIGNAL gate promotion#215
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.shexercises the agent's real no-BPF-LSM code path on any kernel via theAEGIS_LSM_PATHtest seam (kernel_features.cppreads 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_signalmechanism is kernel-version-independent.Asserts (end-to-end)
runtime_state == ENFORCE_SIGNAL,audit_only == falseenforce_capable == false(theBPF_LSM_DISABLEDblocker is still reported)open()from a non-exempt cgroup is killed by a signal (exit > 128). Without the signal the open would succeed (no LSM-EPERMon this path), so a signal-kill is unambiguous proof.Verified locally (6.17)
Wired into
kernel-matrix.yml(runs on every matrix kernel;exit 77= honestly skipped when not root / nosystemd-run).GUARANTEES.mdupdated — gate-promotion behavior is now behaviorally proven, not a follow-up.🤖 Generated with Claude Code