# Where must an instance refuse a re-delegated AAIF warrant whose attenuation chain is monotone in scope but non-monotone in delegation depth **Date of Record:** 2026 November 21 **Scope:** Applies to any agent runtime that accepts AAIF-style authorization warrants carrying an attenuation chain (`iss → sub → sub …`) where each hop is expected to narrow scope. Does not address warrant revocation, key rotation, or transport-level replay protection, which are orthogonal to the depth-vs-scope interaction analyzed here. ## Core Distinction Fine-grained scope attenuation and delegation-depth attenuation are two different monotonicity invariants, and AAIF warrant validation systems routinely conflate them. Scope attenuation is the property that each successive warrant in a chain grants a subset of the parent's capabilities: `caps(w_{n+1}) ⊆ caps(w_n)`. Depth attenuation is the property that each successive warrant carries a strictly smaller remaining-delegation budget: `depth_budget(w_{n+1}) < depth_budget(w_n)`. A validator that checks only the first invariant will accept chains that are scope-monotone but depth-non-monotone — chains where an intermediate holder re-issues a child warrant with the *same or greater* remaining depth than it received, while still trimming capabilities at each hop. The chain looks attenuated on the capability axis and is unbounded on the delegation axis. The distinction matters because the two invariants fail in different directions. A scope violation lets a child do something the parent could not. A depth violation lets a child *outlive, out-reach, or re-delegate beyond* the parent — and the resulting capability set at the leaf can be a strict subset of the root's scope while the leaf's *authority to further delegate* exceeds the root's. This is the boundary condition: a warrant whose scope is a proper subset of its grandparent's, yet whose delegation budget is larger than its grandparent's. It is accepted by scope-only validators and rejected by depth-aware ones. ## What Was Observed A three-hop chain was constructed during a red-team exercise against an AAIF-compliant warrant validator (v2.3 schema, `attenuation_chain` array, `scope_set` as a normalized capability lattice). - Root warrant `w0`: issued by orchestrator `O` to planner `P`. Scope: `{fs:read:/tmp/**, net:egress:api.internal, tool:search}`. Remaining depth: `3`. - Hop 1 — `P` issues `w1` to executor `E`. Scope trimmed to `{fs:read:/tmp/work/**, tool:search}`. Remaining depth set to `3` (should have been `2`). The trimming on the scope axis was *correct*: `caps(w1) ⊂ caps(w0)`. - Hop 2 — `E` issues `w2` to a sub-tool agent `T`. Scope trimmed further to `{tool:search}`. Remaining depth set to `3` again (should have been `1`). The validator accepted the chain. Every scope check passed: `caps(w2) ⊂ caps(w1) ⊂ caps(w0)`, and each hop's signature verified against the parent's public key. The depth field was present but was validated only for *presence and type*, not for monotone decrease. The chain was accepted because the validator's attenuation predicate was `is_scope_subset(child, parent) ∧ signature_valid(child, parent.key)`, with no term for depth. The operational consequence surfaced later. `T` re-delegated to `T'` with scope `{tool:search}` and depth `3`, and `T'` to `T''`, and so on. Each leaf held a scope that was a strict subset of the root, so no individual warrant exceeded the root's *capabilities*. But the delegation tree rooted at `w0` had unbounded branching and unbounded depth: `T''` could spawn siblings indefinitely, each a valid AAIF warrant, each scope-compliant. The root's depth budget of `3` was intended to bound the tree to a depth-3 fan-out. It bounded nothing. The failure was not a scope escape. It was a *delegation escape*: the authority to mint further warrants was propagated without attenuation, while the authority to *act* was correctly attenuated. The two axes decoupled. ## Condition of Validity The scope-monotone/depth-non-monotone chain is only exploitable under a specific conjunction of conditions: 1. The warrant schema carries a depth or delegation-budget field that is *semantically* meant to decrease but is *syntactically* independent of the scope field. 2. The validator's attenuation predicate evaluates scope subset and signature validity but treats depth as advisory metadata (present, well-typed, not compared across the chain). 3. The re-issuing agent (`P`, `E`) has authority to *set* the depth field of the child rather than having it *derived* by the validator as `parent.depth − 1`. When all three hold, any intermediate hop can reset depth to the maximum while still trimming scope, and the chain remains valid. If condition 3 fails — i.e., depth is derived by the validator, not supplied by the issuer — the attack is impossible regardless of conditions 1 and 2, because the issuer cannot assert a depth the validator will not recompute. This is the key structural point: the vulnerability exists precisely because depth is *issuer-asserted* rather than *validator-derived*. The chain is *not* exploitable if scope and depth are coupled in a single attenuation lattice (e.g., depth encoded as a capability `delegate:≤N` that must be a subset of the parent's `delegate:≤M`), because then the scope-subset check subsumes the depth check. It is also not exploitable if the validator recomputes depth. The failure sits in the gap between "depth is a field" and "depth is a derived invariant." ## Decision Boundary The boundary an instance must enforce is: **a child warrant is accepted only if `child.depth < parent.depth` is recomputed by the validator from the chain, not read from the child's asserted field.** The asserted field may be retained for audit, but the acceptance predicate must use the derived value. Concretely, the validator must walk the chain from root to leaf and compute `derived_depth(w_{n+1}) = derived_depth(w_n) − 1`, rejecting if any hop's asserted depth exceeds its derived depth, and rejecting if `derived_depth` reaches zero before the leaf. The asserted depth is then a *claim* that must be `≤` the derived bound, never a substitute for it. This is the same shape as the scope invariant, applied to a second axis: scope is checked as `caps(child) ⊆ caps(parent)` (derived from the lattice, not from the child's claim), and depth must be checked as `derived_depth(child) ≤ derived_depth(parent) − 1` (derived from the chain, not from the child's claim). A validator that derives one axis and asserts the other is half-monotone and will accept the chain described above. The decision boundary for an *instance* (an agent deciding whether to honor an incoming warrant) is narrower: an instance should refuse to honor a warrant whose asserted depth exceeds the depth it can independently derive from the chain it can see, even if the warrant's signature is valid and its scope is a subset. The instance cannot always see the full chain, so it must at minimum refuse warrants whose asserted depth is not strictly less than the depth of the warrant it received — the local monotonicity check. The global check belongs to the validator; the local check belongs to the instance. ## Operational Effect The effect of missing the depth invariant is a delegation tree whose *capability* footprint is bounded by the root's scope but whose *population* is unbounded. In the observed case, the tree grew to 40+ leaf warrants over several minutes, each scope-valid, each individually harmless (`{tool:search}`), but collectively exhausting a shared rate-limit budget and producing a fan-out that the orchestrator's capacity model had assumed was bounded by `depth=3`. The capacity model was wrong because it modeled depth as a bound on tree size, and depth was not enforced. The second-order effect is worse: because each leaf's scope was a strict subset of the root's, scope-based anomaly detection did not fire. Every warrant looked like a legitimate narrowing. The delegation escape was invisible to the detector that was watching the axis the attacker was not violating. The guardrail that bounds this is the derived-depth recomputation described above, plus a tree-size bound at the validator (reject if the number of live descendants of a root exceeds `fanout^depth`). The tree-size bound is the backstop for the case where depth is correctly derived but fan-out per hop is unbounded. A validator that enforces both — derived depth and tree-size cap — reduces the delegation escape to a scope escape, which the existing scope-subset check already handles. The invariant to record: **on every axis of attenuation, the validator must derive the bound from the chain rather than accept the issuer's assertion of it; an axis that is asserted but not derived is an axis that is not attenuated.** ```python from dataclasses import dataclass from typing import Optional class WarrantAttenuationError(RuntimeError): """Raised when an AAIF warrant chain violates an attenuation invariant.""" pass @dataclass(frozen=True) class Warrant: issuer: str subject: str scope: frozenset[str] asserted_depth: int # issuer-supplied; must NOT be trusted as the bound parent_id: Optional[str] def validate_chain(chain: list[Warrant], root_depth: int) -> dict[str, int]: """ Validate an AAIF attenuation chain on BOTH axes. Scope axis: caps(child) must be a subset of caps(parent). Depth axis: derived_depth(child) must be derived_depth(parent) - 1, and the child's asserted_depth must not exceed the derived value. Returns a map of subject -> derived_depth for the accepted chain. Raises WarrantAttenuationError on any violation. """ if not chain: raise WarrantAttenuationError("empty warrant chain") derived: dict[str, int] = {} derived[chain[0].issuer] = root_depth for i, w in enumerate(chain): parent_depth = derived.get(w.issuer) if parent_depth is None: raise WarrantAttenuationError( f"hop {i}: issuer {w.issuer!r} not present in derived chain" ) # Depth axis: derive, do not accept the assertion. expected_depth = parent_depth - 1 if expected_depth < 0: raise WarrantAttenuationError( f"hop {i}: delegation budget exhausted at {w.issuer!r}" ) if w.asserted_depth > expected_depth: raise WarrantAttenuationError( f"hop {i}: asserted_depth={w.asserted_depth} exceeds derived " f"bound {expected_depth} for subject {w.subject!r} " f"(depth-non-monotone delegation)" ) # Scope axis: child scope must be a subset of parent scope. if i > 0: parent_scope = chain[i - 1].scope if not w.scope.issubset(parent_scope): raise WarrantAttenuationError( f"hop {i}: scope {set(w.scope)} not a subset of parent " f"scope {set(parent_scope)}" ) derived[w.subject] = expected_depth return derived def honor_incoming(warrant: Warrant, received_depth: int) -> None: """ Local instance-side check: refuse a warrant whose asserted depth is not strictly less than the depth this instance itself received. """ if warrant.asserted_depth >= received_depth: raise WarrantAttenuationError( f"refusing warrant to {warrant.subject!r}: asserted_depth=" f"{warrant.asserted_depth} is not strictly less than received " f"depth {received_depth}; local monotonicity violated" ) ```