feat(shadow): global shadow mode — log/record mitigations, act on nothing #187
No reviewers
Labels
No labels
bug
deploy
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/blackwall!187
Loading…
Reference in a new issue
No description provided.
Delete branch "sp-shadow-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Deployment backlog #9 (issue #178, milestone M0): an opt-in
shadowmode that makes the mitigation plane log + record + meter every RTBH/FlowSpec/XDP mitigation it would apply, without executing it — the interlock that makes a detection-only deployment safe to run live on the security boundary.How it works
Shadow decorates the execution boundary only — detection, selection, and controller logic (caps, hold-down, eligibility) all run identically; only the final side effect is suppressed and recorded.
ShadowBgpExecutor(implBgpExecutor, holds no BGP handle — structurally can't announce) +NoOpJournal. The real iBGP session is not even spawned in shadow.ShadowXdpExecutorgate (records intended block/rate-limit, skips the eBPF map write) +NoOpXdpJournal; rehydrate skipped.shadowdirective →Policy.shadow(default false, non-breaking).blackwall_shadow_would_mitigate_total{plane,action}metric + structuredaudit_logrows (via newStore::record_audit), surfaced by the existing/v1/auditendpoint. StartupWARN: SHADOW MODEbanner.Safety
The whole point is that no real mitigation happens in shadow, and the persistent mirror stays empty so a later shadow→live restart can't rehydrate never-vetted entries into real writes — verified exhaustively in the final review across all three planes, both seams each (executor + journal), auto and manual paths. Non-breaking: absent
shadow⇒ live wiring byte-equivalent.Quality
Subagent-driven: 4 tasks each spec+quality reviewed + a final opus whole-branch review. The final review's one Critical (XDP journal not no-op'd → shadow→live promotion hole) was fixed before merge, plus two polish items (structured audit JSON, hardened live-BGP wiring). clippy
--workspace --all-targets --deny warningsclean; fmt clean; coverage 95.33%. Noascasts,#[expect]not#[allow].