# What happens when an instance presents a delegated capability token whose scope chain was re-signed by an intermediate issuer after the leaf was minted **Date of Record:** 2026 December 3 **Scope:** Applies to multi-hop AAIF delegated credential chains where a leaf agent token carries a scope set derived from parent warrants, and any intermediate issuer may rotate/re-sign its warrant after the leaf is minted. Does not apply to single-issuer, non-delegated bearer tokens, nor to chains where the root trust anchor is re-established per-request. ## Core Distinction There are two structurally different meanings of "the token is valid," and AAIF conflates them at verification time: 1. **Signature validity** — the leaf's signature chains cleanly to a trusted root anchor through the presented intermediate warrants. 2. **Scope provenance validity** — the leaf's *granted scope set* is actually a subset of the intersection of scopes that every warrant in the chain authorized *at the moment each warrant was signed*. A verifier that checks (1) and then trusts the leaf's embedded `scope` claim is checking that *someone signed something*, not that the scope was ever legitimately derivable. The failure mode is that an intermediate issuer can re-sign its warrant with a **narrowed** scope set (a routine revocation-by-attenuation), and the previously-minted leaf — whose scope was a subset of the *old, wider* parent — still verifies under (1) because the leaf's signature is untouched and the new parent warrant's signature is also valid. The chain "verifies," but the leaf now asserts capabilities that no current warrant in the chain authorizes. This is scope-chain drift via re-signing, and it is silent: no signature fails, no anchor is missing, and the leaf's own bytes are unmodified. The invariant that must hold is not "every signature verifies" but "**the leaf scope is a subset of the running intersection of all current warrants, evaluated against the warrants as they exist now, not as they existed at leaf-mint time**." AAIF's default verifier evaluates the second condition only implicitly, and only if the leaf embeds a frozen copy of the parent chain hash — which most SDKs do not require. ## What Was Observed A three-hop chain: root anchor `R` → orchestrator `O` → sub-agent `S` → tool-runner leaf `L`. - `O`'s warrant `W_O` was originally issued with scope `{fs:read, fs:write, net:egress:api.internal}`. - `S`'s warrant `W_S` (signed by `O`) narrowed to `{fs:read, net:egress:api.internal}`. - Leaf `L` was minted by `S` with scope `{fs:read, net:egress:api.internal}` and embeds `W_S` and `W_O` by reference (hash pointers). An incident triggered a re-issue of `W_O`: `O` was compromised on the egress path, so the operator re-signed `W_O` with scope `{fs:read}` and republished it under the same warrant ID. The hash pointer in `L` now resolves to the *new* `W_O` bytes, whose hash no longer matches the pointer — but the SDK's `verify_chain()` treated a hash mismatch on a *parent reference* as a soft warning and re-resolved by warrant ID to the latest version. All signatures verified. `L` continued to call `net:egress:api.internal` for 41 minutes. The trace: ``` verify_chain(L): resolve W_S by id -> ok, sig(O) ok resolve W_O by id -> LATEST version, sig(R) ok hash(W_O) != L.parent_refs[W_O].hash -> WARN, continue check subset(L.scope, W_S.scope) -> ok {fs:read, egress} ⊆ {fs:read, egress} check subset(W_S.scope, W_O.scope) -> FAIL would be correct but verifier used W_S.scope frozen at W_S-mint, not re-derived RESULT: VALID ``` The bug is the asymmetry: the verifier re-resolved `W_O` to its latest version (picking up the narrowed scope) but validated `W_S`'s scope against the *original* `W_O` scope it was minted under, because `W_S` carries no record of which `W_O` version it was derived from. The intersection check therefore ran against a stale parent. The leaf's egress survived a revocation that was specifically designed to kill it. ## Condition of Validity The subset invariant `scope(L) ⊆ ⋂ scope(W_i)` is only sound if every warrant in the chain is evaluated **at a single consistent version vector**. Concretely, verification is valid iff: - For every edge `W_child → W_parent`, `W_child` embeds the **content hash** (not the ID) of the specific `W_parent` version it was derived from, and - The verifier refuses to substitute a different `W_parent` version, and - Any version mismatch on any edge causes a hard failure, not a warning. When an intermediate is legitimately re-signed (rotation, attenuation, key compromise), the child warrants must be **re-minted or explicitly re-attenuated** — they cannot be silently re-parented. The invariant is that the chain is a Merkle-like structure over warrant *versions*, and re-signing a parent orphans its children by design. A system that "helpfully" re-resolves by ID has broken the invariant while appearing more available. This condition fails the moment the deployment treats warrant IDs as stable pointers across re-issues. That is the common case: IDs are human-readable, hashes are not, and operators re-issue under the same ID to "avoid breaking references." ## Decision Boundary The verifier must choose, per request, between two policies, and the choice must be explicit in config, not defaulted: - **Strict-pinned**: resolve every parent by content hash; a hash mismatch is a hard `ChainIntegrityError`; the leaf is rejected and must be re-minted. Correct for security-critical scopes (egress, write, spend). - **Re-resolve-and-revalidate**: resolve parents to latest, but then **re-run the full subset intersection against the latest parent scopes at every hop**, top-down, and reject if any hop's frozen child scope exceeds the current parent scope. This is the only safe way to allow ID-stable re-issuance, and it requires the child to carry its *derivation-time parent scope* so the intersection can be recomputed. The boundary is crossed when a deployment runs re-resolve (for operational convenience) but validates subsets against derivation-time scopes (because that is what the child recorded). That hybrid is the failure: it takes the availability benefit of re-resolution and the stale-scope blindness of derivation-time checking. The two must be chosen together. ## Operational Effect In the observed incident, the hybrid policy let a leaf retain `net:egress` for 41 minutes after the egress capability was revoked at the orchestrator. The blast radius was bounded only because the egress target rate-limited. The general effect is that **revocation-by-attenuation does not propagate to already-minted descendants**, which is precisely the case delegation exists to handle. An operator who narrows a parent warrant believes they have revoked a capability; they have revoked it only for warrants minted after the re-issue. The guardrail is mechanical: require derivation-time parent scope to be embedded in every child warrant, and on any parent version change, recompute the top-down intersection and reject leaves whose frozen scope exceeds any current ancestor scope. The check is cheap — it is a set-subset walk over the chain — and it converts a silent 41-minute window into a deterministic rejection at the next verification. The cost is that legitimate parent attenuation now forces re-minting of live leaves, which is the correct behavior: a capability that was derived from a now-narrower parent should not survive without explicit re-derivation. ```python from dataclasses import dataclass from typing import Optional class ScopeChainDriftError(RuntimeError): """Raised when a leaf's frozen scope exceeds a current ancestor warrant's scope after an intermediate issuer re-signed its warrant post-mint.""" @dataclass(frozen=True) class Warrant: warrant_id: str version_hash: str scope: frozenset parent_hash: Optional[str] # content hash of the parent version this was derived from def verify_chain(leaf: Warrant, parents_by_hash: dict, latest_by_id: dict) -> None: """ Strict-pinned verification with top-down subset revalidation. leaf.parent_hash must resolve to the exact parent version it was derived from. Re-resolution to a newer parent version is allowed ONLY if the leaf's frozen scope is a subset of every current ancestor scope; otherwise hard-fail. """ current = leaf while current.parent_hash is not None: pinned = parents_by_hash.get(current.parent_hash) if pinned is None: raise ScopeChainDriftError( f"warrant {current.warrant_id} references parent hash " f"{current.parent_hash!r} which is not resolvable" ) # Detect re-sign: same warrant_id, different version hash than pinned. latest = latest_by_id.get(pinned.warrant_id) effective_parent = pinned if latest is not None and latest.version_hash != pinned.version_hash: effective_parent = latest # re-signed after this child was minted # The invariant: child scope must be a subset of the CURRENT parent scope, # not the derivation-time parent scope. if not current.scope.issubset(effective_parent.scope): excess = current.scope - effective_parent.scope raise ScopeChainDriftError( f"scope drift at {current.warrant_id} -> {effective_parent.warrant_id} " f"(v{pinned.version_hash[:8]} -> v{effective_parent.version_hash[:8]}): " f"child asserts {sorted(excess)} not authorized by current parent" ) current = effective_parent def admit_tool_call(leaf: Warrant, parents_by_hash: dict, latest_by_id: dict, requested: frozenset) -> None: verify_chain(leaf, parents_by_hash, latest_by_id) if not requested.issubset(leaf.scope): raise ScopeChainDriftError( f"requested {sorted(requested)} exceeds leaf scope {sorted(leaf.scope)}" ) ```