feat(engine): corroborate drop-then-execute (JEF-321)#272
Merged
thejefflarson merged 2 commits intoJul 26, 2026
Conversation
…ly-written path (JEF-321) Adds the drop-then-execute cross-signal corroboration shape: a ProcessExec of a path RECENTLY FileWrite'n by the SAME workload, on a proven internet-facing foothold entry. Neither behavior alone corroborates today — an ordinary ProcessExec is not a notable_exec and an ordinary /tmp FileWrite is not an alarming_write — so the classic "drop a payload under a benign path, then run it" pattern was invisible to corroboration. Cross-signal state: reuses the entry's existing runtime signal slice (already a bounded, TTL'd + capped per-workload record via RuntimeEvents) rather than introducing a new store. A new DROP_EXEC_WINDOW (5 minutes) narrows "recent" further than the general runtime TTL (30 minutes default) so the correlation reads as one drop-and-run act, not coincidental path reuse hours apart. FP-aware: scoped to a proven internet-facing foothold entry only, mirroring cross_tenant_lateral — an ordinary pod's legitimate write-then-run of its own /tmp script never corroborates. Shadow-gated: only sets `corroborated`, never actuates. Closes JEF-321 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtjoJttCvBY4dzCoE4f9vP
…-retire-falco-g5-corroborate-exec-of-a-just-written-file-drop # Conflicts: # engine/src/engine/reason/proof/corroborate.rs
thejefflarson
deleted the
thejefflarson/jef-321-retire-falco-g5-corroborate-exec-of-a-just-written-file-drop
branch
July 26, 2026 23:20
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.
Summary
Adds the drop-then-execute cross-signal corroboration shape flagged by JEF-321 (Retire-Falco G5): a
ProcessExecof a path RECENTLYFileWrite-n by the SAME workload, on a proven internet-facing foothold entry — the classic "drop a payload under a benign-looking path (e.g./tmp), then run it" pattern.Today neither behavior alone corroborates: an ordinary
ProcessExecis not anotable_exec(shell/pkg-mgr) and an ordinary/tmpFileWriteis not analarming_write(sensitive-path). Only the correlation of the two on the same path is the tell — which the flat, context-free per-behaviorcorroboratespredicate can't express (it only ever sees one behavior at a time).Where the cross-signal state lives (per the ticket's ask)
No new store was introduced. The entry's own
runtime: &[RuntimeSignal]slice — already resolved once per entry viaentry_runtime— is itself a bounded, time-windowed per-workload record: it's fed fromRuntimeEvents(engine/src/engine/observe/runtime.rs), which is TTL'd (runtime_window(), default 1800s / 30 min) and capped atMAX_EVENTS = 4096globally, with per-batch (1024) and per-peer rate limits on ingest. That existing bound is the "recent writes to match the exec against" the ticket calls for.On top of that I added
DROP_EXEC_WINDOW = 300s(5 min) — narrower than the general runtime TTL — so a write and an exec of the same path minutes apart reads as one drop-and-run act, while the same path written and re-run much later (a build cache, a rotated log) does not. The match also requires the write to be AT OR BEFORE the exec (ordering matters).New function
drop_then_executeinengine/src/engine/reason/proof/corroborate.rs, wired intocorroborated_foralongside the existingcross_tenant_lateralshape (JEF-319) it mirrors structurally.FP-aware / entry scoping
Scoped to a proven internet-facing foothold entry only (
EntryContext.is_foothold), exactly likecross_tenant_lateral— apps legitimately write-then-run their own/tmpscripts constantly, so an ordinary pod's write+exec must never corroborate. This is checked first (cheap early-return) before the O(n²) path-correlation scan even runs.Shadow / no-actuation
Only sets
corroborated; never touchesengine.enableor any actuation path (ADR-0014).Tests
New
engine/src/engine/reason/proof/corroborate_drop_exec_tests.rs(mirrorscorroborate_context_tests.rs's style), covering the ticket's acceptance criteria:corroborated_forand directly ondrop_then_execute)DROP_EXEC_WINDOWboundary → still corroborates (<=)DROP_EXEC_WINDOWis asserted narrower than the general runtime TTLChecks
cargo fmt -p protector -- --check— cleancargo clippy --all-targets -- -D warnings— cleancargo test -p protector— 916 passed, 0 failed, 2 ignored (network-only), plus dashboard/file-size guard suites all greenfile_size_guardtest confirms every source file stays under the repo's 1,000-line cap (corroborate.rsis ~275 lines)/simplify-equivalent review (no Agent-tool fan-out available in this context): applied a couple of doc-comment prose cleanups; no structural findings. The nestedO(execs × writes)scan insidedrop_then_executewas considered and intentionally left as a plain nested.any()(matchescross_tenant_lateral's simple-scan style) rather than adding aHashMap— the foothold early-return keeps the hot path free for the overwhelming majority of non-foothold entries, and the underlyingruntimeslice is already small/rate-limited/TTL'd in practice.Closes JEF-321