# When must an instance reject a signed skill manifest whose signature verifies but whose declared capability set exceeds the invoking agent's warrant **Date of Record:** 2026 November 25 **Scope:** Applies to agent runtimes that load skills/tools from a registry via signed manifests (detached or in-line signatures over a canonicalized manifest body) and that bind tool-invocation authority to a per-instance warrant (capability grant). Does not cover unsigned local tooling, in-process function registration without manifests, or pure prompt-injection of tool *arguments* (covered separately). ## Core Distinction The failure mode is not "bad signature." A signature that fails to verify is a trivial rejection. The dangerous boundary is a manifest whose **signature is cryptographically valid over exactly the bytes the signer intended, but whose declared capability set is broader than the warrant held by the instance that is about to load it.** Signature verification answers *"did the publisher sign this manifest?"* It does **not** answer *"is this instance permitted to exercise the capabilities this manifest declares?"* These are two different trust decisions, and skill registries routinely collapse them into one. The second, subtler distinction: manifests are frequently **co-signed or re-signed** during registry promotion (author → registry curator → regional mirror). A curator signature that verifies proves the curator approved the *manifest body*, but if the curator's signing key is scoped to a narrower capability domain than the manifest declares, verification succeeds while authorization should fail. The invariant that must hold is: **`declared_capabilities(manifest) ⊆ warrant(instance) ∩ signing_domain(publisher_chain)`**, evaluated *before* the skill is registered as invocable, not at first tool call. ## What Was Observed A registry promoted a skill manifest `fs.sync@2.3.1` whose body declared: ``` capabilities: ["fs.read:/workspace", "fs.write:/workspace", "net.egress:*.internal"] ``` The manifest was signed by the author key (correct), then re-signed by the registry curator key. The curator key was provisioned under a signing domain of `fs.*` only — it had never been authorized to bless network egress. The re-signing pipeline verified the author signature, appended the curator signature, and **did not re-check declared capabilities against the curator's signing domain**. The curator signature verified cleanly. An instance running a code-review agent held a warrant of `["fs.read:/workspace", "fs.write:/workspace", "model.invoke"]` — deliberately no network egress, because the review agent processes untrusted repository content. On skill load, the runtime performed: (1) signature chain verification → pass; (2) manifest hash pinning → pass; (3) register skill as invocable → **executed unconditionally**. The capability intersection check was never performed because the loader assumed "signed ⇒ authorized." The skill's tool descriptor included a `post_sync_hook` that, on first invocation, attempted `net.egress:*.internal` to a metadata endpoint. The egress was blocked — but only by the *sandbox's* network policy at call time, not by the loader. The agent had already loaded the skill, already mutated its own tool registry, and already begun a reasoning loop that assumed network capability was available. The mid-loop failure surfaced as a tool-call exception the model then tried to "reason around," producing two retries and a partial state checkpoint that recorded the skill as *installed but non-functional* — a poisoned registry entry that survived into the next cold start. The observable signature was not a security breach. It was **capability-warrant divergence**: the instance's tool registry now contained a skill whose declared surface exceeded its warrant, and every subsequent reasoning loop that enumerated available tools saw a capability it could not actually exercise. This is a continuity failure dressed as an authorization failure. ## Condition of Validity The collapse of "verified" into "authorized" is only safe under a condition almost never stated explicitly: > The signature chain's terminal signing domain must be a **superset** of the manifest's declared capabilities, *and* the instance's warrant must be a superset of the manifest's declared capabilities, *and* both checks must be evaluated on the **canonicalized declared-capability set**, not on the manifest's prose description. If any of these three fail, signature verification is necessary but insufficient. In the observed case, condition 1 failed (curator domain `fs.*` ⊉ `net.egress:*`) and condition 2 failed (agent warrant lacks egress). Both were masked by a loader that treated the signature as the sole gate. A second validity condition concerns **canonicalization drift**: declared capabilities must be compared as a parsed, normalized set (scheme + resource + scope), not as raw strings. A manifest declaring `fs.write:/workspace/../etc` and one declaring `fs.write:/etc` are the same capability after path normalization; a loader that string-compares will pass the first against a warrant scoped to `/workspace` and then hand the skill a write capability outside its warrant. The invariant only holds if capability comparison is performed post-normalization. ## Decision Boundary The decision the runtime must make at load time is not binary "accept/reject signature." It is a three-way branch: 1. **Signature invalid** → reject, log, do not register. (Trivial.) 2. **Signature valid AND `declared ⊆ warrant ∩ signing_domain`** → register as invocable. 3. **Signature valid AND `declared ⊄ warrant ∩ signing_domain`** → **do not register as invocable.** Either (a) register in a quarantined state where the skill is discoverable but every tool call is hard-denied before dispatch, or (b) reject outright. The choice between (a) and (b) depends on whether the agent's reasoning loop tolerates "known-but-forbidden" tools; most do not, because the model will attempt to use a tool it can see. Prefer (b) unless the runtime enforces a pre-dispatch capability gate that returns a structured `CapabilityDenied` the model is trained to treat as terminal. The boundary is sharp: the moment the manifest's declared capability set is computed, it must be intersected with **both** the warrant and the terminal signing domain, and the result must equal the declared set. Any non-empty difference is a load-time failure, not a call-time failure. Deferring to the sandbox is the observed bug — the sandbox is a *last* line of defense, not the authorization decision, and relying on it produces the poisoned-registry continuity failure described above. ## Operational Effect Enforcing the invariant at load time changes three things: - **Registry hygiene:** quarantined/rejected manifests never enter the instance's persistent tool registry, so cold-start reconstruction cannot resurrect a skill the warrant never permitted. The checkpoint records a rejection event, not a half-installed skill. - **Reasoning-loop stability:** the model never sees a tool it cannot call. Capability enumeration returns only the intersected set, so multi-step plans cannot diverge into retry storms against a denied tool. - **Auditability:** the rejection reason distinguishes `SIGNATURE_INVALID` from `CAPABILITY_EXCEEDS_WARRANT` from `CAPABILITY_EXCEEDS_SIGNING_DOMAIN`, which matters because the first is a publisher problem, the second an instance-provisioning problem, and the third a registry-curation problem. Collapsing them into one error destroys the operational signal. The cost is that registry promotion pipelines must carry signing-domain metadata alongside keys and must re-validate declared capabilities against that domain at every re-sign hop. That is the price of not letting a valid signature stand in for an authorization decision. ```python from dataclasses import dataclass, field from typing import FrozenSet class CapabilityWarrantViolation(RuntimeError): """Raised when a signature-valid manifest declares capabilities the instance warrant or the terminal signing domain does not cover.""" @dataclass(frozen=True) class Manifest: skill_id: str declared_capabilities: FrozenSet[str] # normalized: scheme:resource signature_chain_valid: bool terminal_signing_domain: FrozenSet[str] @dataclass(frozen=True) class InstanceWarrant: instance_id: str capabilities: FrozenSet[str] def load_skill(manifest: Manifest, warrant: InstanceWarrant) -> Manifest: if not manifest.signature_chain_valid: raise CapabilityWarrantViolation( f"{manifest.skill_id}: signature chain invalid; refusing load" ) authorized = warrant.capabilities & manifest.terminal_signing_domain excess = manifest.declared_capabilities - authorized if excess: # Do NOT defer to sandbox. Reject before registration. raise CapabilityWarrantViolation( f"{manifest.skill_id}: declared capabilities {sorted(excess)} " f"exceed warrant∩signing_domain for instance {warrant.instance_id}; " f"warrant={sorted(warrant.capabilities)}, " f"signing_domain={sorted(manifest.terminal_signing_domain)}" ) # Only reachable when declared ⊆ warrant ∩ signing_domain. return manifest ```