This runbook defines how to run staged canary validation before production release.
- Staging host mirrors production kernel, cgroup, bpffs, and systemd settings.
- BPF LSM is enabled (
grep -qw bpf /sys/kernel/security/lsm). - Candidate binary is built and available as
./build/aegisbpf. - No system service instance is already running (
systemctl is-active aegisbpf).
Run an audit-only pass first to evaluate false positives without process termination.
sudo AEGIS_BIN=./build/aegisbpf \
PHASE=audit \
DURATION_SECONDS=300 \
MAX_RINGBUF_DROPS=100 \
MAX_EVENT_DROP_RATIO_PCT=0.1 \
MIN_TOTAL_DECISIONS=100 \
MAX_RSS_GROWTH_KB=65536 \
scripts/canary_gate.shCollect evidence:
- canary log
- health snapshot
- metrics before/after
- false-positive review notes
Use SIGTERM as the default staged enforcement signal.
sudo AEGIS_BIN=./build/aegisbpf \
PHASE=enforce \
ENFORCE_SIGNAL=term \
DURATION_SECONDS=300 \
MAX_RINGBUF_DROPS=100 \
MAX_EVENT_DROP_RATIO_PCT=0.1 \
MIN_TOTAL_DECISIONS=100 \
MAX_RSS_GROWTH_KB=65536 \
scripts/canary_gate.shCollect evidence:
- enforce canary log
- blocked-event review (legitimate vs false positive)
- restart and rollback behavior
Safety guard:
scripts/canary_gate.shrejectsENFORCE_SIGNAL=killunlessALLOW_SIGKILL_CANARY=1is explicitly set.- Treat kill-mode canary as exceptional containment testing only, never as the standard rollout path.
During canary, execute one rollback drill:
- Apply candidate policy in staging.
- Trigger a controlled failure case.
- Validate rollback behavior and post-rollback health.
- Capture
aegisbpf health --jsonandaegisbpf metricsoutput.
Canary is considered pass only when:
- Audit and enforce canary phases pass.
- Ring buffer drops, drop ratio, and RSS growth stay below thresholds.
- No critical false positives remain unresolved.
- Rollback drill is validated.
Record final status in the release notes or change ticket.