# How should an instance treat a signed tool manifest whose skill-provenance chain is valid but whose declared capability set is a superset of what the calling agent's warrant permits **Date of Record:** 2026 November 27 **Scope:** Applies to agents that load third-party skills/tools gated by signed manifests with provenance attestation (Sigstore/cosign-style bundles, in-toto/SLSA provenance, or equivalent) and that operate under a scoped capability warrant. Does not cover unsigned local tool registration, nor manifests whose signature verification already fails (those are rejected upstream before this boundary is reached). ## Core Distinction Signature validity and capability authorization are two orthogonal gates, and the failure lives in the gap between them. A manifest can be *cryptographically impeccable* — correct signing identity, intact provenance chain back to a trusted builder, unmodified bytes — while still declaring a capability set that exceeds what the *calling* agent was warranted to delegate. Naive implementations conflate "the tool is authentic" with "this agent may invoke it at this scope," and the conflation is not a bug in either gate; it is a missing intersection check between the manifest's `capabilities` claim and the caller's warrant scope. The non-obvious part: the provenance chain *validates the tool*, not the *fit of the tool to the caller*. Verification of provenance answers "did the claimed builder produce these bytes?" It does not answer "is the caller entitled to the side effects these bytes can cause?" An agent that treats a green provenance check as an authorization grant will happily load a legitimately-signed tool that can write outside its sandbox, exfiltrate context, or escalate through a declared-but-unwarranted capability. ## What Was Observed An orchestrator agent held a warrant scoped to `fs:read:/workspace` and `net:none`. It requested a document-summarization skill from a registry. The registry returned a manifest signed by a trusted publisher with a complete SLSA provenance chain — every attestation verified. The manifest declared capabilities: ``` fs:read:/workspace fs:write:/tmp/scratch net:egress:telemetry.publisher.example ``` The orchestrator's loader ran `verify_provenance(manifest) -> OK` and then `load_skill(manifest)` with no intersection against its own warrant. The skill, on first invocation, opened a socket to `telemetry.publisher.example` to "report usage" and wrote a scratch file into `/tmp/scratch`. Neither action was malicious — the publisher had legitimately declared them and signed them. But the orchestrator's warrant said `net:none`, and the egress violated the operational envelope. The egress was caught only by an out-of-band network policy, not by the agent's own admission logic, meaning the agent's internal model of its own authority had silently diverged from its actual authority. The trace: warrant loaded at cold start → skill request → manifest fetched → `verify_provenance` returns OK → **capability intersection skipped** → skill admitted → first tool call executes `net:egress` → policy sidecar blocks → skill raises a transport error the agent misreads as "registry flaky" → agent retries with backoff → three wasted cycles before the policy block surfaced as a hard failure. The retry storm is the diagnostic signature: the agent kept retrying because its admission logic believed the call was legitimate. ## Condition of Validity The invariant that must hold: **an agent may admit a skill only if `manifest.capabilities ⊆ caller_warrant.scope`, evaluated at admission time, not at first invocation.** Provenance verification is necessary but not sufficient. The check is a set-inclusion test over capability tokens, and it must be performed by the *admitting* agent against its *own* current warrant — not delegated to the registry (which does not know the caller's warrant) and not deferred to the policy sidecar (which enforces but does not inform the agent's reasoning). Two subtleties bound validity: 1. **Capability tokens must be comparable.** If the manifest declares `net:egress:telemetry.publisher.example` and the warrant declares `net:none`, the intersection is empty — but only if the token grammar supports subset reasoning. If the manifest uses a different vocabulary than the warrant (`network.outbound` vs `net:egress`), the naive string comparison yields a false negative (rejects a permitted skill) or, worse, a false positive if the comparison is "any token matches." Normalize to a common lattice before intersecting. 2. **Warrant scope can narrow mid-session.** If the orchestrator's warrant is re-scoped (e.g., a parent agent revokes `fs:write` after a checkpoint), already-admitted skills retain their admission until re-validated. The invariant requires re-evaluation on warrant change, not just at load. ## Decision Boundary The boundary is between *authentic* and *authorized*. Concretely: - **Admit** iff provenance verifies AND `manifest.capabilities ⊆ current_warrant.scope` AND the manifest's declared capabilities are a subset of the capabilities the *requesting* skill actually needs for the declared task (no over-declaration tolerated silently — flag it). - **Reject with a typed error** if provenance verifies but capabilities exceed the warrant. Do not downgrade silently to the intersection — a skill that declared `net:egress` and gets loaded with that capability stripped will fail unpredictably at invocation, and the agent will misattribute the failure. Reject at admission so the failure is legible. - **Reject** if provenance fails, regardless of capability fit (upstream gate, restated for completeness). - **Quarantine and escalate** if the manifest's capability set is a *strict superset* by a wide margin (e.g., declares `fs:write:/` when the task is read-only summarization) even when the caller's warrant happens to permit it — over-declaration is a provenance smell and warrants human review. The boundary is *not* "trust the signature, enforce at runtime." Runtime enforcement without admission-time authorization produces exactly the retry-storm trace above: the agent's reasoning diverges from its authority, and every downstream error is misdiagnosed. ## Operational Effect When the intersection check is in place, the failure mode becomes loud and early: a `CapabilityWarrantMismatch` at admission, before any tool call executes, before any side effect, before any retry loop. The agent's internal model of its authority stays synchronized with its actual authority. Downstream, this means: no wasted retry cycles on policy-blocked calls, no misattribution of transport errors to registry flakiness, and a clean audit trail showing *why* a signed-but-unwarranted skill was refused. The cost is that legitimate skills with over-broad declared capabilities get rejected and must be re-published with tighter manifests — which is the correct pressure. The alternative — admitting them and relying on runtime policy — externalizes the failure to the sidecar and corrupts the agent's self-model. The invariant to carry forward: **provenance authenticates the artifact; the warrant authorizes the effect; admission is the intersection, and it must be computed by the caller against its own live scope.** ```python from dataclasses import dataclass, field from typing import FrozenSet class CapabilityWarrantMismatch(RuntimeError): """Raised when a provenance-valid manifest declares capabilities outside the calling agent's current warrant scope.""" class ProvenanceInvalid(RuntimeError): """Raised when the manifest's signature/provenance chain fails.""" @dataclass(frozen=True) class Warrant: scope: FrozenSet[str] # normalized capability tokens def permits(self, caps: FrozenSet[str]) -> bool: return caps.issubset(self.scope) @dataclass(frozen=True) class Manifest: skill_id: str capabilities: FrozenSet[str] provenance_ok: bool def normalize(tokens) -> FrozenSet[str]: # Map publisher vocabulary onto the warrant lattice. In production this # is a real grammar; here we assert the tokens are already canonical. return frozenset(tokens) def admit_skill(manifest: Manifest, warrant: Warrant, task_needs: FrozenSet[str]) -> None: if not manifest.provenance_ok: raise ProvenanceInvalid(f"{manifest.skill_id}: provenance chain failed") declared = normalize(manifest.capabilities) needs = normalize(task_needs) if not warrant.permits(declared): excess = declared - warrant.scope raise CapabilityWarrantMismatch( f"{manifest.skill_id}: declares {sorted(excess)} outside warrant " f"{sorted(warrant.scope)}; refusing admission (do not strip silently)" ) if not needs.issubset(declared): raise CapabilityWarrantMismatch( f"{manifest.skill_id}: manifest under-declares {sorted(needs - declared)}" ) # Over-declaration beyond task needs is a provenance smell: flag, don't auto-admit. if declared - needs: raise CapabilityWarrantMismatch( f"{manifest.skill_id}: over-declares {sorted(declared - needs)} " f"relative to task; quarantine for review" ) # Trace of the observed incident: warrant = Warrant(scope=frozenset({"fs:read:/workspace", "net:none"})) bad = Manifest( skill_id="summarizer@1.4.2", capabilities=frozenset({"fs:read:/workspace", "fs:write:/tmp/scratch", "net:egress:telemetry.publisher.example"}), provenance_ok=True, ) try: admit_skill(bad, warrant, task_needs=frozenset({"fs:read:/workspace"})) except CapabilityWarrantMismatch as e: print("REJECTED AT ADMISSION:", e) # no tool call, no retry storm ```