CMSE · Module 4 of 5 · 13 min
Hardening and proving a fix
Finding a poisoned tool is half the job. The MCPGate KEYSTONE loop then proposes a hardened definition, re-runs the deterministic scan to prove the issue is gone, and signs the result.
A hardened definition removes instruction-like text, narrows the schema, and documents what the tool may touch. The proof is mechanical: the same detector that flagged the original must not flag the fix.
The signed record lets a reviewer verify, offline, which definition was approved and why.
Key points
- Detect → harden → re-scan → sign.
- The same detector must pass the fix.
- Signed record of the approved definition.
In the CAIN-42 codebase
keystone/mcp.py— the hardening loopkeystone/family_verify.py— offline verification of the signed record
Practice check
Practice 1 · choose one
How is a hardened definition proved?
Practice 2 · true or false