In what scenarios must an instance reject a federated capability grant whose trust anchor was re-signed mid-negotiation, and how does warrant-chain fork detection prevent the silent privilege escalation

**Date of Record:** 2026 December 1 **Scope:** Applies to cross-organization agent federations where capability exchange is authorized by a delegated warrant chain rooted in a trust anchor (TLS-style root or signed policy bundle) that can be re-signed or rotated by the issuing org during an in-flight negotiation. Does not apply to single-org deployments with a static, pinned anchor, nor to purely symmetric peer trust with no delegated capability warrants.

Core Distinction

The failure is not "trust anchor expired" and not "signature invalid." Both of those are loud and fail closed. The boundary condition is subtler: **a warrant chain that was validly signed under anchor version N is re-validated under anchor version N+1 after a rotation that occurred mid-negotiation, and the two anchors disagree on a policy predicate that the warrant's capability set depends on.** The warrant still verifies cryptographically under both anchors because the rotation re-signed the *delegation* but not the *capability scope decision*. The verifying instance silently accepts a grant it would have refused at negotiation start.

The invariant that must hold: *the trust anchor identity (root key fingerprint + policy bundle hash) used at warrant issuance must equal the anchor identity used at every subsequent verification step of the same negotiation transaction, or the transaction must abort and re-negotiate.* Anchor identity is part of the transaction's causal history, not a live global variable.

What Was Observed

A federation of three orgs: `alpha` (requestor agent), `beta` (capability provider, holds the trust anchor), `gamma` (policy authority that co-signs `beta`'s anchor bundle). `alpha`'s delegate requests `filesystem.read:/shared` from `beta`. The warrant chain is: `beta_root` → `beta_policy_bundle_v7` → `delegation_warrant` → `alpha_capability_grant`.

At T0, `alpha` fetches `beta`'s anchor bundle v7 and begins warrant validation. At T0+400ms, `gamma` publishes `beta_policy_bundle_v8`, which narrows the `filesystem.read` predicate to exclude paths matching `/shared/**/secrets`. `beta` re-signs and republishes its anchor (same root key, new bundle hash). At T0+700ms, `alpha` completes validation by re-fetching the anchor "to be safe," now gets v8, and validates the *pre-existing* `delegation_warrant` against v8.

The `delegation_warrant` was minted under v7, where `/shared/secrets/` was in scope. Under v8 it is out of scope. But the warrant's signature covers only the capability string `filesystem.read:/shared`, not the path-glob expansion — the glob expansion is a *policy evaluation* performed by the verifier against whichever bundle is current. So the signature verifies under v8, the policy engine evaluates `filesystem.read:/shared` against v8's narrowed predicate, and because the grant's declared scope is the *parent* path, the evaluator returns "permitted for the declared scope" without re-deriving that the declared scope now contains an excluded child. `alpha` receives a grant for `/shared` that includes `/shared/secrets`.

The escalation is silent: no signature failure, no policy exception, no log line distinguishing v7 from v8 evaluation.

Condition of Validity

The exploit requires all of the following to co-occur:

  1. **Mid-negotiation anchor rotation** by the provider org, with the same root key (so root-fingerprint pinning does not catch it).
  2. **Coarse-grained capability strings** whose policy expansion is deferred to verification time rather than bound into the signed warrant. If the warrant signs the *expanded* path set, rotation cannot widen it.
  3. **Re-fetch-on-verify** validation logic — the verifier resolving the anchor at each check rather than binding it once per transaction.
  4. **A narrowing rotation** (v8 ⊆ v7 in scope). A widening rotation is caught by the requestor's own policy floor; narrowing is the dangerous direction because the verifier's "permitted" answer is derived from the *grant's* declared scope, not the intersection with the new bundle.

The invariant that bounds it: **warrant verification must be a pure function of (warrant bytes, anchor bytes, anchor identity), and anchor identity must be committed into the negotiation transcript before any capability is exercised.** If the anchor changes, the transcript hash changes, and the grant is void by construction.

Decision Boundary

An instance must reject-and-restart (not accept-and-proceed) when:

An instance may proceed without restart only when the rotation is purely additive (new roots appended, no predicate on existing capability classes changed) or when the warrant explicitly pins `anchor_bundle_hash` in its signed claims and the pinned hash matches the live hash.

Operational Effect

Without the guardrail, federated capability grants become *retroactively mutable* by the provider: a provider can narrow policy after issuing a warrant and the requestor's cached grant silently retains the pre-narrowing scope. In audit replay this appears as a valid grant under a valid anchor — the fork is invisible unless the transcript records both anchor hashes and the expansion delta. The practical consequence is that revocation-by-policy-rotation does not work across org boundaries: `gamma` cannot revoke `alpha`'s access to `/shared/secrets` by narrowing v8, because `alpha` already holds a v7-derived grant that re-validates cleanly. Operators must treat anchor rotation as requiring explicit warrant re-issuance and must log the `(anchor_hash_at_issue, anchor_hash_at_verify, expansion_delta)` triple on every federated grant to make forks detectable in replay.

import hashlib
from dataclasses import dataclass


class WarrantForkError(RuntimeError):
    """Raised when a warrant's anchor identity diverges mid-negotiation."""
    pass


@dataclass(frozen=True)
class AnchorBundle:
    root_fingerprint: str
    bundle_hash: str
    # maps capability class -> set of permitted path globs
    expansion: dict


@dataclass(frozen=True)
class Warrant:
    scope: str                 # e.g. "filesystem.read:/shared"
    issued_under_bundle: str   # bundle_hash at mint time
    signature: str


def _expand(bundle: AnchorBundle, scope: str) -> frozenset:
    cls = scope.split(":", 1)[0]
    return frozenset(bundle.expansion.get(cls, ()))


def verify_federated_grant(
    warrant: Warrant,
    anchor_at_issue: AnchorBundle,
    anchor_at_verify: AnchorBundle,
    transcript_anchor_hashes: list,
) -> bool:
    # 1. Anchor identity must be stable across the transaction.
    if anchor_at_issue.bundle_hash != anchor_at_verify.bundle_hash:
        # Rotation happened. Only additive, non-predicate-changing rotations pass.
        issue_exp = _expand(anchor_at_issue, warrant.scope)
        verify_exp = _expand(anchor_at_verify, warrant.scope)
        if verify_exp < issue_exp:
            raise WarrantForkError(
                f"anchor rotated to narrow scope of {warrant.scope!r}: "
                f"issued_under={warrant.issued_under_bundle} "
                f"verify_under={anchor_at_verify.bundle_hash} "
                f"lost={sorted(issue_exp - verify_exp)}"
            )
        if warrant.issued_under_bundle != anchor_at_verify.bundle_hash:
            raise WarrantForkError(
                "warrant not re-minted after non-additive anchor rotation"
            )

    # 2. Root fingerprint must match even if bundle differs (defense in depth).
    if anchor_at_issue.root_fingerprint != anchor_at_verify.root_fingerprint:
        raise WarrantForkError("root key fingerprint changed mid-negotiation")

    # 3. Transcript must not contain more than one distinct bundle hash
    #    for this negotiation unless a re-mint is recorded.
    distinct = set(transcript_anchor_hashes)
    if len(distinct) > 1 and warrant.issued_under_bundle not in distinct:
        raise WarrantForkError(
            f"warrant bundle {warrant.issued_under_bundle} absent from "
            f"transcript anchors {sorted(distinct)}"
        )

    # 4. Signature check (stubbed; real impl verifies against root key).
    expected = hashlib.sha256(
        f"{warrant.scope}|{warrant.issued_under_bundle}".encode()
    ).hexdigest()
    if warrant.signature != expected:
        raise WarrantForkError("warrant signature invalid under resolved anchor")

    return True