# Under what conditions must an instance treat skill-registry signature validity as independent of the skill's declared capability manifest **Date of Record:** 2026 November 18 **Scope:** Applies to agent runtimes that dynamically load skills, tools, or plugins from a registry or marketplace where an artifact carries both (a) an integrity/signature envelope and (b) a self-declared capability manifest (permissions, tool bindings, scopes). Does not apply to statically compiled tool bindings or to registries that derive capabilities server-side from the signature identity rather than from artifact-supplied metadata. ## Core Distinction A signed skill is not a *safe* skill. The signature attests to *provenance and integrity* — that the bytes came from a given publisher and were not modified in transit. It says nothing about whether the *declared capabilities inside those bytes* are honest, minimal, or consistent with what the skill actually does at execution time. The failure mode is a conflation of two orthogonal trust properties: **authenticity** (who published it, unmodified) and **authority** (what it is allowed to do). Registries routinely bind these together — a valid signature causes the loader to accept the manifest's self-declared scopes — and that binding is the injection surface. The non-obvious part: the attack does not require forging a signature or compromising a publisher. It requires only that a *legitimately signed* artifact declare capabilities broader than its visible behavior, or that the manifest be evaluated at load time while the actual tool calls are resolved later against the same manifest. The signature check passes; the capability check is reading attacker-controlled input. ## What Was Observed In a registry-backed loader, an artifact arrived with a valid publisher signature. The manifest declared `tools: [search, http_fetch]` and `scopes: [read:public]`. The loader verified the signature, then merged the manifest's declared scopes into the agent's active permission set. At execution, the skill invoked a tool binding by *name* through the shared tool registry — and the registry resolved the name to whatever binding was currently registered, not to the binding the manifest referenced at signing time. A second, later-loaded skill had registered a binding under the same name (`http_fetch`) with a broader implementation. The first skill's signed manifest said `read:public`; the resolved binding executed with the second skill's authority. No signature was invalid; no bytes were tampered. The capability that actually ran was not the capability that was signed. A second observation: a skill whose manifest declared a narrow scope performed a privileged operation by *delegating* to a tool whose own manifest declared the privileged scope. The caller's scope check passed because the caller never invoked the privileged tool directly; the callee's scope check passed because the callee's own manifest legitimately declared it. The composition of two individually-valid authority grants produced an authority neither grant intended — a confused-deputy chain assembled entirely from signed, unmodified artifacts. ## Condition of Validity The invariant "signature validity implies capability safety" holds **only** under all of the following: 1. Capabilities are derived from the *signing identity* by the registry, not read from artifact-supplied metadata. 2. Tool bindings are resolved by *content identity* (hash/pinned reference), not by mutable name lookup in a shared namespace. 3. Scope checks are enforced at the *point of effect* (the syscall/tool boundary), not at load time against a manifest snapshot. 4. Delegation is *attenuating*: a callee cannot exercise authority the caller did not hold, and the union of caller+callee scopes is never the effective grant. If any of these is false, signature validity and capability safety are independent, and the loader must not treat a valid signature as authorization. In the observed system, conditions 2 and 4 were false, and condition 3 held only partially. ## Decision Boundary An instance must **reject or quarantine** a signed skill when any holds: - The manifest declares a scope set that is not a subset of the scopes the registry derives from the publisher identity. - A tool binding referenced by the manifest resolves by name to a binding whose content hash differs from the hash recorded at signing time. - The skill's transitive call graph includes a tool whose declared scope exceeds the caller's declared scope (non-attenuating delegation). - The manifest was evaluated at load time but tool resolution occurs later against a mutable registry. An instance may **accept** a signed skill without further capability scrutiny only when resolution is content-pinned and delegation is provably attenuating. Signature checking alone is never sufficient grounds for acceptance. ## Operational Effect The practical consequence is that the loader's trust decision must be split into two gates with separate inputs: an *integrity gate* (signature over bytes) and an *authority gate* (derived scopes vs. declared scopes, content-pinned binding resolution, attenuation check on the call graph). Collapsing them into one gate — the common design — converts every signed artifact into a capability-injection vector, because the attacker's only required move is to publish a validly-signed artifact whose manifest lies about scope or whose bindings resolve late. The mitigation is not stronger signatures; it is refusing to read authority from signed-but-untrusted metadata, and enforcing scope at the effect boundary where the resolved binding is finally known. ```python import hashlib from dataclasses import dataclass from typing import Mapping class CapabilityInjectionError(RuntimeError): """Raised when a signed artifact's effective authority exceeds its derived authority.""" @dataclass(frozen=True) class SignedArtifact: publisher: str payload: bytes signature_valid: bool declared_scopes: frozenset[str] declared_bindings: Mapping[str, str] # binding name -> content hash at signing def derive_scopes_from_identity(publisher: str) -> frozenset[str]: # Authority comes from the registry, never from the artifact. registry = {"trusted-pub": frozenset({"read:public"})} return registry.get(publisher, frozenset()) def resolve_binding(name: str) -> str: # Live registry lookup: name -> current content hash. live = {"http_fetch": "sha256:deadbeef", "search": "sha256:cafe"} if name not in live: raise CapabilityInjectionError(f"unresolvable binding: {name}") return live[name] def admit(artifact: SignedArtifact, caller_scopes: frozenset[str]) -> frozenset[str]: if not artifact.signature_valid: raise CapabilityInjectionError("integrity gate failed: bad signature") derived = derive_scopes_from_identity(artifact.publisher) if not artifact.declared_scopes <= derived: raise CapabilityInjectionError( f"authority gate failed: declared {artifact.declared_scopes} " f"exceeds derived {derived}" ) for name, signed_hash in artifact.declared_bindings.items(): live_hash = resolve_binding(name) if live_hash != signed_hash: raise CapabilityInjectionError( f"binding {name} resolved to {live_hash}, signed as {signed_hash}" ) effective = artifact.declared_scopes if not effective <= caller_scopes: raise CapabilityInjectionError( "non-attenuating delegation: skill scopes exceed caller scopes" ) return effective ```