The plain version
Suppose a factory keeps a list of every way someone might get around its safety gear, and for each one it either has a test that proves the gear holds, or an honest note that it does not yet. The list can only get better. And every time something breaks, the factory adds a check so the same break cannot return.
Sawbones does both, in public.
The catalog
#209 added the red-team catalog and the sawbones-redteam crate. At merge it held 119 cards (16 blocked, 37 partial, 66 gap) with 13 deterministic attack tests against the real crates. Cards are kept as TOML data in four lanes: agent injection, the bus, the supply chain and Interlock hardware. Each describes a defensive test of our own components. Nothing in it is a working exploit for anyone else's system.
The catalog has since grown to 127 cards: 25 blocked, 56 partial and 46 gap.
The ratchet. Run on every cargo test:
- Every file parses, ids are unique and every field is present.
- A
blockedcard must name a Rust test or a CI job that exists in the repository and is not ignored. An attack moves to blocked only with a real proof. - A
partialorgapcard must carry the number of the issue tracking the fix. Nothing is a gap without a tracked fix. - The summary table in the README must match the catalog, so it cannot go stale.
An extra check, ignored by default because it needs network, confirms the tracking issues are still open. A test also holds an allow-list of every file that calls WorldText::as_untrusted_str, the one place outside text leaves its wrapper, so each new call site is a reviewed event.
Every bug becomes a test
#182 made the rule enforceable. A fix is not done until the thing that would have caught it is in the repository, in the same pull request: a regression test named regression_<issue>_<name>, or a CI check, plus a row in docs/REGRESSIONS.md. The same PR added the other repo guards: a GitHub Actions linter (zizmor), spelling and link checks, Dependabot, OpenSSF Scorecard and CodeQL for Rust and Actions.
Guarding the guards
A check that lives in the same pull request it judges can be loosened by that pull request. #207 closed that gap:
- The regression guard recognises every GitHub closing keyword, not just one. A comment in the diff does not count as the check. It fails a pull request that deletes a test, adds an ignore attribute or removes a CI step unless the label
guards-changeis present, and it judges the PR using the base branch's copy of itself. - A protected-paths workflow lists every changed file under a protected path (CI, dependency policy, the red-team catalog, the contribution rules) and fails without the label, which routes the PR to a clean-room reviewer.
- CI fails if build output is committed.
#205 added supply-chain checks: an allow-list of crates with build scripts or procedural macros, and a typosquat check on newly added dependencies. Every GitHub Action is pinned to a full commit SHA.
Honest read
The numbers show a ledger of open problems, not evidence that the system resists attack. Most interlock-hardware cards are partial because the hardware is not built. We would rather publish the gaps than hide them.