# How should an instance enforce per-invocation attenuation when a delegated AAIF warrant's scope is itself re-scoped by a downstream agent? **Date of Record:** 2026 November 26 **Scope:** Applies to any agent runtime that issues or consumes Agent-to-Agent Identity Framework (AAIF) warrants carrying a signed `scope` claim, where least-privilege delegation requires each hop to attenuate (narrow, never widen) the granted capability set. Does not cover warrant freshness/revocation propagation or transport-level mutual TLS; those are orthogonal invariants. ## Core Distinction There are two structurally different things an agent can do to a delegated warrant: **attenuation** (producing a child warrant whose scope set is a subset of the parent's, with the same issuer chain and a strictly contained capability lattice) and **re-scoping** (a downstream agent interpreting the scope string, deciding what it "really needs," and minting a child whose scope is *semantically narrower but syntactically outside the parent's declared set*). The first is the invariant AAIF least-privilege depends on. The second is the failure mode. The non-obvious part: re-scoping passes every naive subset check because the child's declared scope is *smaller in cardinality* than the parent's. A downstream agent delegated `tools:read,tools:write,secrets:rotate` that re-scopes to `tools:read` looks like textbook attenuation. But if the parent's actual grant was `tools:read` on resource `repo:A` and the child claims `tools:read` on resource `repo:B`, the subset check on the *scope token* passes while the *capability* has been laterally widened. Attenuation must be evaluated over the **capability lattice (verb × resource × constraint)**, not over the flat scope string. ## What Was Observed A three-hop delegation chain: orchestrator → planner → executor. 1. Orchestrator holds a root warrant with scope `{verb:read, resource:repo:A, constraints:{paths:/src/**}}`. 2. Orchestrator delegates to planner a child warrant with scope `{verb:read, resource:repo:A, constraints:{paths:/src/**}}` (identity attenuation, no narrowing needed). 3. Planner, needing to enumerate files, re-scopes to `{verb:read, resource:repo:A, constraints:{paths:/src/**, max_depth:unbounded}}` — it *dropped* a constraint it never had (`max_depth` was never in the parent) and *added* one it invented. The scope string shrank from one constraint to two, so a cardinality-based subset check reported "narrower." 4. Executor received the child warrant, validated the signature chain (valid), validated the flat scope subset (passed), and executed `read` against `repo:A` with `paths:/src/**` **and no depth bound**, traversing symlinks into `/src/../../secrets`. The parent's original intent — a bounded read — was silently violated. The failure trace is precise: constraint *removal* is widening, but constraint *substitution* (dropping an inherited constraint and adding a novel one) can masquerade as narrowing when the checker only counts constraints or compares scope tokens as sets. The child's constraint set was not a superset of the parent's constraint set, and the validator never checked that direction. ## Condition of Validity Per-invocation attenuation is only sound when the validator enforces **constraint monotonicity per (verb, resource) pair**: for every capability `c_child` in the child warrant, there must exist a `c_parent` in the parent such that `verb(c_child) == verb(c_parent)`, `resource(c_child) ⊆ resource(c_parent)`, and `constraints(c_child) ⊇ constraints(c_parent)` — i.e., every constraint present in the parent is present and *at least as tight* in the child, and no constraint is dropped or replaced. This is valid only if: - The constraint representation is **normalizable** (e.g., `paths:/src/**, max_depth:5` and `paths:/src/**, max_depth:5, follow_symlinks:false` compare deterministically). Free-form constraint strings break monotonicity checking because "at least as tight" is undecidable without a lattice. - The parent warrant's constraints are **complete** — if the root grant omitted `follow_symlinks`, then no child can be required to preserve it, and the executor's default (`follow_symlinks:true`) becomes the effective widening vector. Completeness is the issuer's obligation, not the validator's. - Re-scoping is **forbidden at the protocol level**: a child warrant's scope must be produced by *intersection* with the parent's scope, never by the child agent authoring a fresh scope literal. If the child can author scope, monotonicity is unenforceable because the child controls the comparison input. When any of these does not hold, the boundary is open and the invariant is decorative. ## Decision Boundary The boundary between safe attenuation and silent widening sits at the moment a downstream agent **constructs** its child scope rather than **deriving** it. - **Derive (safe):** `child_scope = parent_scope ∩ requested_scope`, computed by the runtime, with the runtime refusing to mint if `requested_scope ⊄ parent_scope` under lattice semantics. The requesting agent supplies a *desired* capability; the runtime supplies the *granted* one. - **Construct (unsafe):** the agent emits a scope literal and signs a child warrant. Even with a post-hoc subset check, the check operates on the agent's own representation, which the agent can shape to pass. The trigger condition for the failure is therefore: *any* code path where the child agent's scope literal reaches the warrant signer without passing through a lattice-intersection function that treats the parent's constraints as a lower bound. The failure is not that the agent was malicious; it is that the agent *reformulated* the scope in good faith (e.g., "I only need to read, so I'll declare `read`") and the reformulation lost the resource/constraint structure that carried the actual privilege bound. ## Operational Effect In practice, the observable consequences are: 1. **Constraint erasure on reformulation.** Agents routinely drop constraints they consider "irrelevant to my task," and every dropped inherited constraint is a widening. The executor cannot distinguish this from legitimate attenuation without per-capability monotonicity checking. 2. **Lateral resource shift.** A child claiming `read:repo:B` when the parent granted `read:repo:A` passes flat-set subset checks (same verb, same cardinality) but violates the resource containment invariant. This is the dominant real-world escape because resource identifiers are often treated as opaque strings rather than lattice elements. 3. **Default-inheritance widening.** Constraints omitted from the parent are filled by executor defaults at execution time, and the child — having never seen the default — cannot preserve it. The invariant must be stated over the *effective* constraint set (declared ∪ defaults), not the declared set alone. 4. **Audit blind spot.** Because the child's scope looks narrower in the logs (fewer tokens, smaller cardinality), post-hoc audit tools that rank warrants by scope size will rank the violating child as *more* restricted than its parent, inverting the risk signal. The architectural guardrail that bounds this: a **lattice-intersection minting function** that is the only path to warrant signing, with the parent's effective constraints as a hard lower bound, plus a **rejection-and-escalate** path — if the requested scope cannot be expressed as an intersection, the runtime refuses to mint and returns control to the parent agent rather than approximating. Approximation is where the invariant dies. ```python from dataclasses import dataclass, field from typing import FrozenSet class AttenuationViolation(RuntimeError): """Raised when a child warrant's scope is not a sound attenuation of its parent.""" @dataclass(frozen=True) class Capability: verb: str resource: str # Effective constraints = declared ∪ executor defaults, resolved before comparison. constraints: FrozenSet[tuple[str, str]] = field(default_factory=frozenset) def contains(self, other: "Capability") -> bool: """True iff self is at least as permissive as other (other ⊆ self).""" return ( self.verb == other.verb and self.resource == other.resource # child constraints must be a SUPERSET (at least as tight) of parent's and self.constraints.issubset(other.constraints) ) def derive_child_scope( parent_scope: FrozenSet[Capability], requested_scope: FrozenSet[Capability], ) -> FrozenSet[Capability]: """ The ONLY sanctioned path to a child warrant scope. Refuses to mint if any requested capability is not contained in some parent capability under lattice semantics (verb × resource × constraints). """ derived: list[Capability] = [] for req in requested_scope: # Find a parent capability that fully contains the request. covering = [p for p in parent_scope if p.contains(req)] if not covering: raise AttenuationViolation( f"requested capability {req.verb}:{req.resource} " f"constraints={sorted(req.constraints)} is not contained in any " f"parent capability; refusing to mint (would widen privilege)" ) # Intersect constraints with the tightest covering parent to preserve bounds. tightest = min(covering, key=lambda p: len(p.constraints)) derived.append( Capability( verb=req.verb, resource=req.resource, constraints=req.constraints | tightest.constraints, ) ) return frozenset(derived) def validate_warrant_chain( parent_scope: FrozenSet[Capability], child_scope: FrozenSet[Capability], ) -> None: """Post-hoc validator for warrants minted outside the sanctioned path.""" for child in child_scope: if not any(p.contains(child) for p in parent_scope): raise AttenuationViolation( f"child capability {child.verb}:{child.resource} " f"constraints={sorted(child.constraints)} escapes parent scope; " f"constraint substitution or resource shift detected" ) # --- Demonstration of the observed failure --- if __name__ == "__main__": parent = frozenset({ Capability( verb="read", resource="repo:A", constraints=frozenset({("paths", "/src/**"), ("max_depth", "5")}), ) }) # Planner's good-faith re-scope: dropped max_depth, added follow_symlinks. malicious_child = frozenset({ Capability( verb="read", resource="repo:A", constraints=frozenset({("paths", "/src/**"), ("follow_symlinks", "true")}), ) }) validate_warrant_chain(parent, malicious_child) # raises: max_depth dropped ```