CONTINUITY: Security-Context Contracts for Composable LLM Agent Controls
Abstract
LLM agent systems increasingly combine provenance tracking, authorization, policy enforcement, protocol adapters, and execution controls. However, individually correct security mechanisms do not necessarily compose into an end-to-end secure system: security-critical context may be dropped, widened, rebound, or reinterpreted as actions cross component boundaries. We identify this failure mode as security-context discontinuity and introduce CONTINUITY, a framework for verifiable composition of agent security controls. CONTINUITY models each component with an assume-guarantee contract and carries authenticated security context across transitions using signed root grants, provenance commitments, role-bound transition receipts, bounded typed releases, transformation witnesses, and effect-bound execution permits. We formalize end-to-end consequence integrity, requiring every realized external effect to be backed by a valid and current authorization witness linking the principal, task, provenance, delegation, policy state, canonical action, and finality boundary. We implement a reference verifier and deterministic cross-layer fault-injection suite covering 32 fault classes across four application domains. In 2,560 parameterized attack instances spanning 128 fault-domain classes, the full CONTINUITY configuration commits no harmful external effect, while completing all 700 benign tasks and escalating all 200 ambiguous cases. These results show that secure agent execution requires not only sound individual controls, but explicit contracts that preserve their guarantees across the complete instruction-to-effect path.
Figures & tables
| Family | Fault classes | Violated obligation |
|---|---|---|
| Root and grant | Untrusted root producer; root authority exceeded; root scope exceeded; root field-constraint bypass | Accepted ingress/issuer, authenticated root grant, bounded operation/resource/field constraints |
| Provenance and release | Untrusted field binding; provenance drop; provenance value substitution; memory laundering; release predicate bypass; release value substitution; expired release | Signed manifest, leaf-value binding, source continuity, source/value/path/predicate/issuer/expiry-bound release |
| Identity and topology | Principal substitution; unauthorized stage signer; receipt/producer mismatch | Principal continuity, stage–identity–contract binding, authorized predecessor and receipt producer |
| Authority and policy | Authority amplification; delegation widening; taint downgrade; policy downgrade; context-root omission | Non-amplification, scope monotonicity, taint monotonicity, policy freshness, model-context commitment |
| Action semantics | Argument mutation; destination substitution; tool-server swap; effect-class downgrade | Leaf preservation, exact tool/manifest/server binding, exact effect classification |
| Transform contracts | Missing transform witness; invalid transform witness; contract-guarantee violation | Declared relation, trusted witness, before/after binding, postcondition satisfaction |
| Configuration | Effect ASR | Classes | Benign | Ambig. |
|---|---|---|---|---|
| Pass-through | 100.0% | 0 | 100% | 0% |
| Tool allowlist | 100.0% | 0 | 100% | 0% |
| Gateway policy | 96.9% | 4 | 100% | 0% |
| Provenance gateway | 84.4% | 20 | 100% | 100% |
| Effect-bound permit | 81.3% | 24 | 100% | 0% |
| Gateway + finality | 65.6% | 44 | 100% | 100% |
| Ablation | Reopened classes |
|---|---|
| No field provenance | 24 |
| No contract conformance | 24 |
| Incomplete mediation | 24 |
| No root authentication | 16 |
| No release validation | 12 |
| No transform-witness validation | 8 |
| Operation | p50 | p95 |
|---|---|---|
| Proof verification | 4.21 ms | 4.91 ms |
| End-to-end transition + finality | 7.17 ms | 8.07 ms |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Reason family | Meaning |
|---|---|
| E_UNTRUSTED_ROOT | Chain origin not in trusted ingress set |
| E_ROOT_*_EXCEEDED | Root authority, scope, class, or field bound exceeded |
| E_PROVENANCE_VALUE_MISMATCH | Resolved leaf differs from signed manifest claim |
| E_UNRELEASED_FIELD | Untrusted protected field needs validation/escalation |
| E_INVALID_RELEASE | Source, value, predicate, task, tool, or expiry check failed |
| E_UNAUTHORISED_STAGE_SIGNER | Key is not configured for stage/contract |
| Claim | Artifact evidence |
|---|---|
| Root and role enforcement | core.py ; root/role regression tests |
| Leaf provenance | JSON Pointer tests; provenance substitution tests |
| Typed release | predicate/value/expiry tests and 300 utility cases |
| Legitimate transformation | alias witness tests; every normal trace |
| Effect containment | raw_results.csv , by_fault.csv |
| Ablations | ablation_raw.csv , ablation_summary.csv |
LLM Agent Security
Large language model agent security studies attacks and safeguards for systems that plan, use tools, retain memory, and act across applications.
See all 332 papers