# How should an instance detect that a signed agent manifest was re-bound to a different runtime identity between attestation and invocation **Date of Record:** 2026 November 26 **Scope:** Applies to cross-org agent invocation where a caller verifies a signed manifest (capabilities, model fingerprint, tool grants, data scopes) before delegating a task, and where the manifest is bound to a runtime identity (container image digest, process attestation, or key). Does not cover intra-org trust where the manifest issuer and consumer share a control plane. ## Core Distinction The failure is not signature forgery. The signature verifies correctly. The failure is **identity re-binding**: a validly signed manifest `M` is paired at invocation time with a runtime `R'` that is not the runtime `R` the manifest was attested against. The cryptographic invariant most agents check — `Verify(sig, M, pubkey) == True` — holds. The missing invariant is `Bind(M.runtime_identity) == AttestedIdentity(R')`. Between the moment a manifest is signed and the moment an agent is invoked under it, the binding between "what was signed" and "what is now executing" is a mutable, unverified reference. Three concrete re-binding vectors observed: 1. **Digest aliasing:** manifest pins `image: agent-x@sha256:AAA`, but the invocation resolves a mutable tag `agent-x:latest` → `sha256:BBB`. Signature valid; runtime different. 2. **Key reuse across tenants:** same signing key attests manifests for two tenants; a manifest signed for tenant A is replayed to invoke a runtime provisioned for tenant B. 3. **Attestation freshness gap:** manifest carries a TTL and a runtime measurement, but the verifier checks the TTL against wall-clock at *fetch* time, not at *execution* time, and never re-measures the runtime. ## What Was Observed A research agent (`org-alpha`) delegated a summarization task to `org-beta`'s agent `summarizer-v3`. The manifest was signed by `org-beta`'s issuer key, listed capability `read:public-corpus`, model fingerprint `fp-7c2`, and pinned runtime digest `sha256:9f1e...`. `org-alpha`'s verifier confirmed the signature, checked `exp` was 40 minutes in the future, and dispatched. The execution trace showed the following state transitions: ``` t0 manifest fetched, sig OK, exp=t0+40m, runtime_digest=sha256:9f1e t1 dispatch to org-beta gateway, carrying manifest id + bearer token t2 gateway resolves agent by NAME (not digest) -> sha256:4a0d (newer build) t3 runtime sha256:4a0d executes; its tool-grant set includes read:private-corpus t4 result returned; org-alpha accepts, logs manifest id as provenance ``` The manifest id was logged as the provenance record. The actual runtime — `sha256:4a0d`, with a broader tool grant than attested — never appeared in `org-alpha`'s audit trail. The signature was never wrong. The binding was never checked at the point where it mattered: the gateway's name→digest resolution at `t2`, and the runtime's self-report at `t3`. A second instance compounded it: the `exp` check at `t0` was against the verifier's clock. `org-beta`'s gateway clock was 43 minutes ahead. By the gateway's own clock the manifest had expired, but the gateway did not re-check `exp`; it trusted the caller's pre-flight. The freshness invariant was enforced on the wrong side of the trust boundary. ## Condition of Validity The signature-verifies invariant is only *sufficient* under a condition that is almost never stated: **the runtime identity resolved at invocation must be the same identity the manifest was attested against, and that equality must be checked by the party that controls the runtime, at the moment of execution, and reported back in a form the caller can bind.** Formally, trust in the delegation requires: ``` Verify(sig, M, issuer_key) # caller-side AND Resolve(M.agent_name) == M.runtime_digest # gateway-side, at dispatch AND Measure(R') == M.runtime_digest # runtime-side, at exec AND M.exp > now(issuer_clock) # both clocks, min() AND M.tenant_id == R'.tenant_id # key-reuse guard ``` Any conjunct skipped leaves a re-binding window. The dominant skip is the second and third: name-based resolution and absence of runtime self-measurement. The signature check is the visible one; the binding check is the one that fails silently. ## Decision Boundary An instance should treat a manifest as **unbound** — and refuse delegation or downgrade to a no-trust call — when any of the following holds: - The manifest identifies its runtime by **name or mutable tag** rather than content digest, and the gateway does not echo the resolved digest back in the response envelope. - The response envelope lacks a **runtime attestation** (measurement quote, signed digest report) that the caller can compare to `M.runtime_digest`. - The manifest's `exp` is checked only on the caller side and the gateway does not independently enforce it against its own clock. - The signing key is **shared across tenants** and the manifest carries no tenant binding that the runtime independently asserts. - The runtime's reported **tool-grant set** is not a subset of the manifest's attested capability set. The boundary is sharp: a manifest whose runtime binding cannot be re-verified at execution is not a trust artifact, it is a *hint*. Agents that treat it as an artifact inherit a provenance record that points at the wrong runtime. ## Operational Effect When an instance correctly detects the re-binding window, three behaviors change: 1. **Provenance records become runtime-anchored, not manifest-anchored.** The audit entry logs `(manifest_id, resolved_digest, attestation_quote)`, and a mismatch is a hard fail, not a warning. This closes the `t4` gap where the wrong runtime executed under a valid manifest id. 2. **The caller can no longer outsource freshness.** `exp` and tenant binding are enforced at the gateway and re-asserted by the runtime, so a skewed clock on either side fails closed rather than open. 3. **Capability drift is bounded.** Because the runtime self-reports its tool grants and the caller intersects them with the attested set, a runtime that gained `read:private-corpus` after signing cannot act on it under a `read:public-corpus` manifest — the intersection is empty and the call is rejected before tool use. The residual cost is one extra round-trip (attestation quote in the response envelope) and a digest-pinned resolution on the gateway. That cost is the price of the binding invariant; without it, signature verification is theater. ```python class ManifestRebindError(RuntimeError): """Raised when a signed manifest is bound to a runtime other than the one attested.""" pass def verify_delegation(manifest, response_envelope, issuer_key, now_issuer, now_gateway): # 1. Signature is necessary but not sufficient. if not verify_signature(manifest, issuer_key): raise ManifestRebindError("manifest signature invalid") # 2. Freshness must be enforced on both clocks; fail closed on skew. if manifest.exp <= min(now_issuer, now_gateway): raise ManifestRebindError( f"manifest expired under issuer/gateway clock: exp={manifest.exp} " f"issuer={now_issuer} gateway={now_gateway}" ) # 3. Runtime identity must be content-addressed and echoed back. resolved = response_envelope.get("resolved_digest") if resolved is None: raise ManifestRebindError("gateway did not echo resolved runtime digest") if resolved != manifest.runtime_digest: raise ManifestRebindError( f"runtime re-bound: attested={manifest.runtime_digest} resolved={resolved}" ) # 4. Runtime must self-measure and quote; caller binds the quote. quote = response_envelope.get("attestation_quote") if quote is None or measure(quote) != manifest.runtime_digest: raise ManifestRebindError("runtime attestation quote does not match attested digest") # 5. Tenant binding guards against shared-key replay across tenants. if response_envelope.get("tenant_id") != manifest.tenant_id: raise ManifestRebindError( f"tenant mismatch: manifest={manifest.tenant_id} runtime={response_envelope.get('tenant_id')}" ) # 6. Runtime tool grants must be a subset of attested capabilities. granted = set(response_envelope.get("tool_grants", [])) attested = set(manifest.capabilities) if not granted.issubset(attested): raise ManifestRebindError( f"capability drift: runtime grants {granted - attested} not attested" ) return True ```