Every night, solo maintainers merge dependency PRs nobody has reviewed. SentryMesh is a multi-agent review crew for pull requests: deterministic scanners surface suspects, analyst agents reason about reachability and authorization, an Exploit-Prover confirms or refutes each serious claim by actually running an exploit in a sandbox, and a red-vs-blue tournament turns surviving fixes into pull requests that have already withstood a counter-attack. Every verdict ships with evidence in an auditable objection ledger. On our labelled validation corpus, execution proving took precision from 73% to 100% — it removed every scanner false alarm the no-Prover pipeline reported (6 of 6). And when we widened the nomination stage to cover dynamically constructed paths, recall on the same corpus rose from 44% to 100% — the wider net cost the full pipeline nothing, because verdicts come only from execution.
Inspiration
Supply-chain incidents rarely start with a mastermind. They start with a tired maintainer, a green "merge" button, and a diff nobody read. We asked: what would the review team a solo maintainer can't hire look like, if AI agents staffed it — and how would she know their work is trustworthy? Our answer: don't let the agents grade their own homework. Make them prove it, then make them break the proof.
What it does
- Find (deterministic): osv-scanner, gitleaks, and semgrep with a curated ruleset sweep the repo. No LLM scans — tools are better at it. Their raw output is labelled candidates, never verdicts.
- Reason (agents): Reachability, AuthZ & Logic, and Taint analysts answer only the questions tools can't, from typed, quarantined evidence packs. Their judgments are schema-validated and annotated in the ledger — and they can never change a verdict.
- Prove (sandbox): the Exploit-Prover generates a proof-of-concept for each serious claim and executes it in an isolated sandbox (network-less, capability-dropped, resource-capped, canary-instrumented). Verdicts are confirmed-with-evidence, refuted-with-evidence, or unresolved — and unresolved is shown in the ledger, never buried. The full trail lands in an objection ledger: claim, file:line, evidence, verdict, counter-evidence.
- Fix (tournament): a Blue patch agent fixes each confirmed exploit; a Red agent retries the original PoC, a systematic variant library (encoding, traversal, boundary, and sanitizer-bypass variants), and a prompt-injection suite. Only patches that survive all of it ship — and only with their evidence.
- Run it: one command — sentrymesh — runs the whole pipeline and prints a human summary plus a machine-readable ledger (JSON + SARIF).
How we built it
A budgeted, checkpointed orchestration graph over a Python 3.12 core — standard library only, zero third-party runtime dependencies. Onto it we layered: semgrep rules written from OWASP's own test cases, a YAML-driven rule pack, a JSON-Schema-validated analyst evidence pack, bwrap and Docker sandboxes with resource caps, canonical canary tokens, and a prompt-injection harness. The system is intentionally unglamorous under the hood: no LLM API is connected in this environment, so the agent interfaces run deterministic engines in its place.
Challenges we ran into
- Our scanner silently scanned nothing. Semgrep's git-aware targeting scans 0 files for untracked files in a fresh clone. We detect that silently-empty case and force an explicit scan, because a tool that silently returns nothing is worse than a tool that errors.
- Docker cannot start containers on our build VM (the kernel delegates no cgroup CPU/memory controllers to the user session), so all executions ran under Prover-Lite: bwrap with mounts, capabilities, network, and CPU/memory limits — isolated, cheap, and everywhere.
- Red broke our first patch — with a symlink. Blue's first JS fix used path.resolve containment; Red's symlink variant broke it. We added symlink/canonicalization tests to the Red variant library, and the patch now resolves realpaths before containment checks.
- A broken PoC must never masquerade as a refuted claim. Early on, PoCs that called a handler with the wrong argument shape failed silently, and we almost marked real bugs refuted. We now distinguish execution-failure from refuted-with-evidence.
- The scanned repo attacks the reviewers. Our trapped-repo cases carry prompt injections in READMEs, code comments, and issue text. We built the prompt-injection suite from the same OWASP materials as the corpus and harden agents with input quarantine and output validation.
Accomplishments we're proud of
- A finding pipeline whose every promoted claim carries an execution transcript, not a confidence score — and a ledger that shows refutations, counter-evidence, and unresolved claims alongside the confirmed ones.
- Official validation run (Day 7, this build, reproducible:
python3 scripts/run_benchmark.py): on a 26-case corpus (24 synthetic + 2 real-CVE sinks): precision 100% (16/16), recall 100% (16/16), F1 1.00 — with a deliberately conservative gate that prefers unresolved over wrong. - The ablation (same corpus, Stage 0 + analysts only): precision 73%, recall 100% — a scanner-only pipeline would have shipped 6 false alarms as "findings". Execution proving removed every one (6 of 6). Execution proving also resolved 4 of 5 "unresolved" scanner claims (leaving 1 unresolved — the real CVE's false-alarm analogue, CVE-2018-8021's benign usage). The Prover was decisive on precision, not recall.
- The corpus's original recall miss — a path traversal built by string concatenation that the first nomination stage's literal patterns missed — has since been addressed in the nomination stage, because the corpus now contains 7 additional dynamic-construction cases (4 Python + 3 JS) and the same no-Prover ablation still scores recall 100%. Patching has since caught up: the patch writer now covers the dynamic-construction shapes, pickle.load and the Unpickler API too, and 15 of 16 confirmed findings graduate a patch under the same fail-closed tournament gate (see Honest limits for the one that does not, and why).
- Corpus method, in one paragraph: the corpus is 26 cases — 24 original synthetic cases in the OWASP-Benchmark style (path traversal + pickle deserialization across Python and JavaScript), plus a vulnerable/patched pair for one real CVE sink (CVE-2018-8021) to check calibration against a real-world pattern. No other CVE cases were in scope. Every case is labelled (vulnerable or benign), every verdict is reproducible in one command, and we will publish the corpus with the repo.
What we learned
Verification beats volume: an agent whose job is to disprove — backed by execution, not rhetoric — can remove an entire class of errors. The scanner's job is recall; the Prover's job is precision; the tournament's job is trust. The ledger is what makes that trust checkable.
What's next
Wire LLM engines into the existing agent interfaces (PoC writing first — it widens provable classes), extend the tournament to the patch writer's remaining shapes (teach the patch writer the dynamically constructed sink shapes it cannot yet fix), add an OpenVEX reporter to emit machine-readable vulnerability attestations, and register the GitHub App to enable real webhook reviews.
Honest limits
- Sandbox: on the build VM all executions ran under Prover-Lite (bwrap), not Docker — labelled in every verdict and in the ledger. Same isolation model, different enforcement mechanism.
- Agents: deterministic engines behind agent interfaces; no LLM API is connected in this environment, so analyst judgments are rules, not reasoning.
- Provable classes today: Python path traversal, Python pickle deserialization, JS path traversal. SQL injection, XSS, SSRF, and other classes are out of scope and unproven.
- Corpus: 26 labelled cases — 24 synthetic plus one real CVE sink (CVE-2018-8021) as a vulnerable/patched pair. It is a validation corpus, not the internet. Results generalize only as far as its coverage does.
- Patching — 15 of 16, and the one rejection is a probe mismatch, not a broken patch: the deterministic patch writer covers the original sink shapes plus dynamic path construction (Python f-strings, %-formatting, str.format, concatenation, pathlib; JS template literals, concatenation, path.resolve), pickle.load(stream) and the pickle.Unpickler(...).load() API; every one of those patches graduated at revision 1 under the same tournament gate (original PoC refuted, full Red variant library stopped, benign behaviour intact). The remaining case — base64-wrapped pickle — has a written patch that holds (PoC refuted, all Red variants stopped), but the gate's functional probe feeds it raw pickle bytes while the function's input contract is base64 text, so the probe fails on patched and unpatched code alike and the fail-closed gate does not graduate it. We record that as a probe/input-contract mismatch; we did not loosen the gate to make the number 16.
- GitHub: webhook receiver + least-privilege App manifest are built; the App is not registered and PR comments are not live.
- OpenVEX: not built (first item on the design's pre-agreed cut list).