ContractGuard blocks indirect prompt injection by verifying tool contracts
ContractGuard eliminates injection success to zero against modeled attacks
Security & privacy arXiv 17 Jun 2026 Defense Prototype evidence
Published as “The Gate Is Only as Honest as Its Contracts: ContractGuard for the Contract Layer of Risk-Aware Causal Gating”
Why it matters
Enables safe deployment of tool-augmented LLM agents by guaranteeing that contract-based attacks cannot re-expose high-risk tools.
Summary
ContractGuard’s full stack (all three mechanisms) reduces injection success to zero (worst-case attack-induced ISR = 0.00) against an exhaustive white-box adaptive attacker, while each partial defense (signed provenance, typed attestation) only stops its matched attack and leaves others succeeding. The paper shows that effect-integrity (preconditions/effects) is the load-bearing trust assumption of RACG, not the risk label, and validates the guarantee on a synthetic benchmark and six frontier LLMs.
What they found 1
- Full-stack ContractGuard (L3) achieves zero injection success against all attacks.
“At L3 the worst-case attack-induced ISR is 0.00 across all targets: no perturbation in the modeled space defeats the full stack.”
Caveats 2
- The L3 = 0 result holds only while the trusted attestation ContractGuard compares against is itself uncompromised.
- What the symbolic model does not capture-real deployment overheads, irreversible external side effects, and a non-worst-case policy distribution-we state explicitly in Section XI.
What’s new here 4
- Identifies contract integrity as a hidden trust assumption in Risk-Aware Causal Gating.
- Shows RACG actually consists of two sequential gates and that the causal gate dominates, making effect integrity primary.
- Introduces ContractGuard, a layered verifier (signed provenance, typed contract attestation, runtime effect verification) that together eliminate all modeled contract attacks.
- Provides an exhaustive adaptive attacker evaluation that gives a formal guarantee of zero injection success for the full stack, and confirms the result on six real LLMs.