arXiv(opens in a new tab)cs.CRSep 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2609.05269

CONTINUITY: Security-Context Contracts for Composable LLM Agent Controls

Chris Zheng, Geng Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

Tool-using large language model agents increasingly combine provenance tracking, task-scoped authorization, policy gateways, protocol adapters, and effect-bound execution. These controls are commonly specified and tested in isolation. Their composition can nevertheless fail when a boundary drops a source label, accepts a self-declared authority root, widens a delegation, changes an approved field without a valid transformation relation, or executes a stale or replayed permit. We call this failure class security-context discontinuity.

We define end-to-end consequence integrity (ECI): every externally realized effect must have a verifiable witness connecting the exact effect to an authenticated chain origin, principal, task, field-level provenance, root grant, component contracts, current policy, finality sink, and single-use execution state. We introduce an assume-guarantee contract model and a reference system, CONTINUITY, that enforces signed root grants; role-bound component identities; RFC 6901-style leaf paths; signed provenance and context manifests; bounded, source- and value-bound typed releases; independently verifiable transformation witnesses; and subject-, action-, policy-, revocation-, and replay-bound finality permits.

The 1.5-KLOC trusted-core prototype is evaluated with a deterministic conformance suite comprising 32 cross-layer fault classes, four domains, and 20 parameterized instances per fault-domain pair, plus 700 benign and 200 ambiguous tasks. Across 3,460 scenarios and 24,220 system-scenario runs, CONTINUITY contains all 128 fault-domain classes and commits no harmful effect in 2,560 attack instances, while automatically completing all benign tasks and escalating all ambiguous tasks. The strongest incomplete reference configuration commits a harmful effect in 65.6% of attack instances. Targeted ablations reopen 4-24 fault-domain classes depending on the omitted invariant. Median proof verification is 4.21 ms and median end-to-end transition production, verification, permit issuance, and finality is 7.17 ms on the recorded host. These are deterministic conformance results under an ex-

plicit trusted-computing-base model, not an estimate of real-world attack probability or a claim to solve semantic correctness.

1 Introduction

Large language model (LLM) agents increasingly read attacker-writable content, synthesize plans, call external tools, delegate work, and create effects that outlive the model invocation. Indirect prompt injection demonstrates that data retrieved from a web page, email, document, or tool response can influence an agent toward attacker-chosen actions [1-3]. System-level defenses therefore separate untrusted data from control, constrain tool privileges, track causal support, or interpose policy at execution [4-8].

A deployed agent rarely uses only one control. A typical path contains an ingress authenticator, provenance service, memory layer, policy gateway, protocol adapter, tool server, and final effect sink. Each component may be locally reasonable while the end-to-end path is insecure. Consider an email action whose destination was derived from an untrusted invoice. A provenance layer labels the destination and a policy gateway requires a validated release. An adapter later serializes the action but drops the source binding, rewrites a logical alias, or binds the permit to a different representation. A final sink sees a valid signature and an allowed tool name, yet cannot determine whether the concrete destination is the one the gateway approved. The failure is not necessarily in prompt classification or in either endpoint; it is in the composition.

We call this class of failure security-context discontinuity: a security-relevant fact is lost, weakened, reinterpreted, or rebound between controls. Discontinuity has several forms. A chain may begin at a self-declared authority root; a component signing key may be accepted for a role it was never authorized to perform; a release may name a field but fail to bind the source value or validity interval; an adapter may perform an allowed-looking transformation without proving the declared relation; or a finality sink may omit subject, policy, revocation, or replay checks. Cryptographic signatures alone do not prevent these failures. A signature authenticates who emitted an object, not whether the emitter was authorized for that stage or whether its transformation preserved the upstream security contract.

This paper asks:

Under what explicit conditions do independently useful agent-security controls compose into an end-to-end consequence boundary?

We model the LLM planner as adversarial: it may propose any action, parameters, destination, tool, or natural-language justification. The trusted computing base (TCB) consists of explicitly configured root issuers, provenance and release validators, component-role bindings, the deterministic verifier, a key service, and mediated finality sinks. Our goal is not to prove that the model reasons correctly. It is to ensure that an external effect cannot be committed merely because the model proposed it.

We define end-to-end consequence integrity (ECI). Informally, every realized effect must carry a verifiable witness from an authenticated root grant through each authorized transition to a current, single-use, effect-bound permit. The witness includes field-level source commitments, component identities and contracts, any typed release or semantic transformation evidence, and finality state. We then express each control as an assume-guarantee contract:

Ci=(Ai,Gi,Pi,Mi),\mathcal{C}_{i}=(A_{i},G_{i},P_{i},M_{i}),

where AiA_{i} are input assumptions, GiG_{i} are output guarantees, PiP_{i} are fields that must be preserved, and MiM_{i} are explicit transformation relations. Safe composition requires that upstream guarantees discharge downstream assumptions and that every changed security field is either preserved or justified by an independently checked relation witness. This follows the broader tradition of compositional specifications [9], but instantiated the interface around agent authority, provenance, action semantics, and finality.

We implement these ideas in CONTINUITY. The prototype uses signed root grants, trusted ingress identities, fixed component-role-contract topology, JSON Pointer leaf paths [10], signed provenance/context manifests, signed typed-release credentials, transformation witnesses, and one-shot finality permits. The adapter performs a real security-relevant transformation in every normal scenario: a logical destination alias is resolved to a canonical sink address. The transformation is accepted only when a trusted directory witness binds the before value, after value, relation, component, contract, task, and expiry. Thus, the evaluation does not obtain security by simply forbidding all changes.

We make five contributions:

  1. Problem and taxonomy. We identify security-context discontinuity as a distinct composition failure and organize 32 fault classes spanning root trust, provenance and release, component topology, semantic transformation, policy freshness, finality, and replay.

  2. Formal model. We define ECI, role-bound transition witnesses, and sufficient composition conditions: authenticated roots, field-level continuity, authority non-amplification, validated transformations, current policy, exact effect binding, and complete mediation.

  3. Reference design. We present proof-carrying context transitions with signed manifests, bounded typed releases, semantic relation witnesses, and state-revalidated finality permits.

  4. Executable artifact. We provide a dependency-light Python implementation, 30 regression tests, deterministic fault injection, seven reference configurations, targeted ablations, raw results, and reproducibility scripts.

  5. Evaluation. Across 128 fault-domain classes and 2,560 parameterized attacks, the full configuration commits no harmful effect, while incomplete compositions fail on 4–128 classes. All 700 benign tasks, including 300 bounded external-data releases and a legitimate destination transformation, complete automatically; all 200 unreleased ambiguous tasks escalate.

The result is deliberately narrower than “solving prompt injection.” A malicious planner may still produce harmful text, bad recommendations, or denial of service. CONTINUITY instead establishes a testable structural claim: if the declared TCB and composition conditions hold, a planner-controlled proposal cannot directly cross the finality boundary without a valid end-to-end witness.

References (19)