# What structural signals indicate a delegated-scope attenuation break in an AAIF capability attestation chain **Date of Record:** 2026 November 25 **Scope:** Applies to agent-to-agent authorization where an orchestrator mints a verifiable credential (VC) with a delegated scope set and hands it to a sub-agent, which may further delegate. Does not cover root issuer key compromise, transport-level TLS failures, or single-hop direct authorization where no delegation occurs. ## Core Distinction The boundary that fails is not authentication—every signature in the chain verifies. It is **scope attenuation**: the invariant that a delegated credential's effective permission set must be a subset of the delegator's. AAIF chains carry this as a structural property (each VC's `scope` claim is intersected with its parent's at verification), but the intersection is only sound if the verifier resolves the *scope grammar* identically at every hop. When a delegator and a verifier disagree about what a scope string *means*—not whether it matches—the subset check passes on syntax and fails on semantics. The credential is cryptographically valid and semantically over-broad. This is distinct from a signature forgery or a replay. The chain is intact; the lattice is not. ## What Was Observed An orchestrator agent `O` held a root credential with scope `repo:read,repo:write,billing:read`. It delegated to worker `W` a credential with scope `repo:read`—correctly attenuated. `W`, needing to file a report, delegated to sub-worker `S` with scope `repo:read,report:write`. The verifier accepted the chain: `report:write` is not in `O`'s root scope, but the intersection logic only flagged **direct** parent-child mismatches where the child's scope string was a literal non-subset of the immediate parent. The break: `W`'s scope grammar used hierarchical namespacing where `report:write` was interpreted as a *child* of an implied `report:*` granted transitively by `repo:read` (a buggy scope-expansion rule in `W`'s minting library, where `repo:read` expanded to include sibling read surfaces). The verifier, using a flat-string matcher, saw `repo:read,report:write` as a literal superset of `repo:read` and **should** have rejected it—but its intersection routine normalized `report:write` to `report:write` and compared against the parent's *expanded* set, which the verifier itself expanded using the same buggy rule. Two wrong expansions agreed, and the chain validated. The signal was structural: the child VC's `scope` claim contained a token (`report:write`) whose expansion under the verifier's own grammar produced a capability (`report:write`) that did not appear in the *root* credential's expansion. The intermediate hop's expansion masked it because the verifier only checked hop-local subset, never root-anchored subset. ## Condition of Validity The attenuation invariant holds only when, for every credential `C_i` at depth `i` in a chain rooted at `C_0`: `expand(C_i.scope, grammar) ⊆ expand(C_0.scope, grammar)` where `expand` is a **single, versioned function** applied identically to every hop, and `grammar` is pinned in the credential's `@context` and enforced by the verifier—not inherited from the minting agent's library. The failure condition is any chain where the verifier applies hop-local intersection without root-anchoring, or where `grammar` is resolved per-hop from the delegator's environment rather than from the credential itself. A second validity condition: the scope grammar must be **monotone under expansion**—expanding a scope must never introduce a capability not lexically implied by the original token. Hierarchical namespaces satisfy this; wildcard-expansion rules that pull in sibling surfaces do not. ## Decision Boundary The verifier must reject at the boundary where **root-anchored expansion fails**, not where hop-local subset fails. Concretely: - Compute `root_set = expand(C_0.scope, pinned_grammar)` once. - For each hop, compute `hop_set = expand(C_i.scope, pinned_grammar)`. - Reject if `hop_set ⊄ root_set`, regardless of whether `hop_set ⊆ expand(C_{i-1}.scope)`. If the verifier cannot pin a single grammar version across the chain (e.g., the root credential was minted under grammar v1 and a hop under v2), it must treat the chain as **non-attenuable** and fall back to explicit per-capability grants rather than attempting cross-version intersection. Cross-version intersection is the silent-over-broadening path. ## Operational Effect Chains that pass hop-local but fail root-anchored checks are the dominant source of privilege creep in multi-hop AAIF delegation. The observable symptom is a sub-agent holding a capability its root issuer never granted, with a fully valid signature chain and no failed verification event in logs—because the verifier's check *succeeded* against the wrong reference set. Detection requires logging the root-anchored expansion diff at every hop, not just the boolean subset result. The guardrail is to make the root credential's expanded capability set the sole comparison target and to treat any grammar version skew as a hard stop rather than a best-effort intersection. ```python from dataclasses import dataclass from typing import FrozenSet class ScopeAttenuationError(RuntimeError): """Raised when a delegated credential's root-anchored scope exceeds the root grant.""" @dataclass(frozen=True) class Credential: depth: int scope: FrozenSet[str] grammar_version: str def expand(scope: FrozenSet[str], grammar_version: str) -> FrozenSet[str]: # Pinned expansion: monotone, no sibling-surface leakage. if grammar_version != "v1": raise ScopeAttenuationError( f"unsupported grammar version {grammar_version!r}; cannot root-anchor" ) return frozenset(scope) def verify_chain(chain: list[Credential]) -> None: if not chain: raise ScopeAttenuationError("empty attestation chain") root = chain[0] root_set = expand(root.scope, root.grammar_version) for cred in chain[1:]: if cred.grammar_version != root.grammar_version: raise ScopeAttenuationError( f"grammar skew at depth {cred.depth}: " f"{cred.grammar_version!r} vs root {root.grammar_version!r}" ) hop_set = expand(cred.scope, cred.grammar_version) if not hop_set.issubset(root_set): leaked = hop_set - root_set raise ScopeAttenuationError( f"root-anchored attenuation break at depth {cred.depth}: " f"capabilities {sorted(leaked)} not granted by root" ) # Reproduces the observed failure: hop-local subset holds, root-anchored fails. chain = [ Credential(depth=0, scope=frozenset({"repo:read", "repo:write", "billing:read"}), grammar_version="v1"), Credential(depth=1, scope=frozenset({"repo:read"}), grammar_version="v1"), Credential(depth=2, scope=frozenset({"repo:read", "report:write"}), grammar_version="v1"), ] verify_chain(chain) # raises ScopeAttenuationError on report:write ```