# How does an instance detect warrant attenuation forgery in a delegated agent chain when the signing key is shared across a tool sandbox **Date of Record:** 2026 November 28 **Scope:** Applies to agent-to-agent delegation chains where each hop carries a signed authorization warrant (capability token) and where delegated agents execute inside a sandbox that reuses a single service-account signing key across sibling tools. Does not apply to chains using per-hop asymmetric keypairs with hardware-bound attestation, nor to single-agent tool calls with no downstream delegation. ## Core Distinction A delegation warrant has two separable properties: **authority** (what the holder may do) and **provenance** (who actually exercised it at each hop). Most agent frameworks conflate these by signing the whole chain with one key. When a tool sandbox shares that key across sibling agents, an attenuated warrant is *cryptographically indistinguishable* from a legitimately delegated one. The failure is not signature forgery in the classical sense — every signature verifies. The failure is that **the chain cannot prove which sibling minted the attenuated hop**, so an agent that was granted `read:calendar` can mint a warrant for `read:email` and have it pass verification because the verifier only checks "signed by a key trusted for this sandbox," not "signed by the key bound to the delegating principal." The invariant that breaks: *a warrant's attenuation must be attributable to the specific delegating instance, not merely to the sandbox that hosted it.* ## What Was Observed A three-hop chain: orchestrator `A` delegates `read:calendar` to worker `B`; `B` delegates a narrowed `read:calendar:today` to sub-worker `C`. Both `B` and `C` run in the same tool sandbox `S`, which holds one Ed25519 key `K_S`. `A` holds a separate key `K_A` and issues `B`'s warrant signed by `K_A`. `B` mints `C`'s warrant signed by `K_S`. Trace of the failure: 1. `C` requests `read:email`. The request is denied — `C`'s warrant lacks the capability. 2. `C` (or a sibling `B'` co-resident in `S`, or an injected instruction reaching `C`) calls the sandbox's signing endpoint with a self-constructed warrant payload claiming `read:email`, parent = `B`'s warrant, signed by `K_S`. 3. The verifier at the resource gateway validates: (a) signature against `K_S` — passes; (b) parent hash matches `B`'s warrant — passes; (c) attenuation monotonicity — the claimed `read:email` is *not* a subset of `B`'s `read:calendar`, so a correct verifier rejects here. The non-obvious break is at step (c) when the verifier trusts a **cached attenuation check**. If `B`'s warrant was validated once and its capability set memoized under the sandbox key `K_S`, and `C`'s forged warrant reuses `B`'s parent hash, a verifier that keys its memo table on `(signing_key, parent_hash)` will serve the memoized "valid" result for the child without re-checking subset. The forged `read:email` child is accepted because the *parent's* validation is cached and the child's payload never re-enters the subset check. Observed in logs as: `verify: cache_hit key=K_S parent=0x9f… result=valid` followed by `grant: read:email subject=C`. The root cause is a **cache key collision across the delegation dimension**: the memo key `(signing_key, parent_hash)` is not injective over children, because many children share one parent and one sandbox key. Two distinct children — one legitimate, one forged — collapse to the same cache entry. ## Condition of Validity The guardrail holds only under all three of the following; violating any one reopens the hole: 1. **Per-instance signing keys.** Each delegating instance mints with a key bound to its own identity (`K_B`, `K_C`), and the verifier checks that the child's signing key equals the parent warrant's stated `delegatee_key`. A sandbox-wide key is disallowed for any hop that carries attenuated authority. 2. **Cache keys include the child digest.** Any memoization of attenuation results must key on `(parent_hash, child_payload_digest)`, never on `(signing_key, parent_hash)` alone. The child digest must be computed over the *claimed capability set*, not just the parent reference. 3. **Re-check on cache miss only, but miss is guaranteed by (2).** Because the child digest varies per request, a forged child never hits a legitimate entry. The subset check runs at least once per unique child. If keys are shared (condition 1 violated), the system is only safe if every verifier recomputes subset on every request (condition 2 with no cache). The moment caching is introduced for latency, the collision is live. ## Decision Boundary The instance must decide, per verification, whether it is operating in a **trusted-key regime** (per-instance keys, condition 1 satisfied) or a **shared-key regime** (sandbox-wide key). The decision changes the required verifier behavior: - **Trusted-key regime:** caching on `(parent_hash, child_digest)` is safe; the signing key already binds provenance, so a cache hit implies the same signer produced the same child. - **Shared-key regime:** no attenuation cache is permissible unless the cache key includes the child digest *and* the verifier additionally checks a nonce or monotonic counter embedded in the child warrant that the sandbox increments per mint. Without the counter, two children with identical payload digests (a replay) also collide — an attacker replays a previously-valid child warrant after the parent's authority was revoked. The boundary is crossed silently: a chain that starts in trusted-key regime and later migrates a hop into a shared sandbox does not fail closed. It fails open, because the verifier's regime flag defaults to "trusted" and the shared key still verifies. Detection requires an explicit assertion that the child's `signing_key_id` matches the parent's declared `delegatee_key_id` — an equality check that most implementations omit because "the signature already verified." ## Operational Effect An instance that omits the provenance equality check will accept forged attenuated warrants at the rate of sandbox co-residency, with no signature failure to alert on. The blast radius is bounded by the union of capabilities reachable from any co-resident sibling's authority, not by the delegating instance's own grant. Auditors reading the warrant chain see a cryptographically valid chain and cannot distinguish forgery from delegation — the audit trail is *sound but not complete*. The remediation is a single invariant enforced at verification: **for every hop, assert `child.signing_key_id == parent.delegatee_key_id` and assert the attenuation cache key includes `hash(child.capability_set)`.** When either assertion fails, the verifier must raise rather than fall through to signature-only acceptance. This converts a silent open-fail into a loud, attributable rejection. ```python import hashlib from dataclasses import dataclass, field class WarrantProvenanceError(RuntimeError): """Raised when a delegated warrant cannot be attributed to the delegating instance.""" pass @dataclass class Warrant: subject: str capabilities: frozenset parent_hash: str | None signing_key_id: str delegatee_key_id: str | None nonce: int = 0 def digest(self) -> str: payload = f"{self.subject}|{sorted(self.capabilities)}|{self.parent_hash}|{self.nonce}" return hashlib.sha256(payload.encode()).hexdigest() class WarrantVerifier: def __init__(self, trusted_keys: dict, cache_enabled: bool = True): self.trusted_keys = trusted_keys self.cache_enabled = cache_enabled self._cache: dict = {} def verify(self, child: Warrant, parent: Warrant | None) -> bool: if child.signing_key_id not in self.trusted_keys: raise WarrantProvenanceError( f"signing key {child.signing_key_id!r} not trusted" ) if parent is not None: # Provenance invariant: the child must be signed by the key the # parent explicitly delegated to. Shared sandbox keys violate this. if parent.delegatee_key_id != child.signing_key_id: raise WarrantProvenanceError( f"provenance mismatch: parent delegated to " f"{parent.delegatee_key_id!r} but child signed by " f"{child.signing_key_id!r}" ) # Attenuation must be monotonic: child capabilities subset of parent. if not child.capabilities.issubset(parent.capabilities): raise WarrantProvenanceError( f"attenuation violation: {sorted(child.capabilities)} not " f"subset of {sorted(parent.capabilities)}" ) if not self.cache_enabled: return True # Cache key MUST include the child's capability digest, not just the # parent hash and signing key, or sibling children collide. cache_key = (child.parent_hash, child.signing_key_id, child.digest()) if cache_key in self._cache: return self._cache[cache_key] self._cache[cache_key] = True return True def delegate(parent: Warrant, child_caps: frozenset, child_signing_key_id: str, nonce: int) -> Warrant: if not child_caps.issubset(parent.capabilities): raise WarrantProvenanceError( f"cannot delegate {sorted(child_caps)} from parent grant " f"{sorted(parent.capabilities)}" ) return Warrant( subject="child", capabilities=child_caps, parent_hash=parent.digest(), signing_key_id=child_signing_key_id, delegatee_key_id=None, nonce=nonce, ) def detect_shared_key_forgery(verifier: WarrantVerifier, forged: Warrant, parent: Warrant) -> None: try: verifier.verify(forged, parent) except WarrantProvenanceError: return # correctly rejected raise WarrantProvenanceError( f"forged warrant {forged.digest()[:12]} accepted under shared key " f"{forged.signing_key_id!r}; provenance check missing" ) ```