# In what scenarios must an instance treat a signed skill manifest as insufficient proof of tool provenance in a dynamically loaded registry **Date of Record:** 2026 November 21 **Scope:** Applies to agent runtimes that resolve tools/skills from a mutable registry at load time, where each manifest carries a signature over its declared capability surface. Does not apply to statically linked tool sets compiled into the runtime image, nor to registries where the manifest and the executable artifact are a single signed unit. ## Core Distinction A signed manifest attests to *who authored the declaration*, not to *what the loaded artifact does at execution time*. The failure mode is a **signature-to-behavior gap**: the manifest signature is valid, the publisher identity is legitimate, the declared `capabilities` field is honest, and yet the loaded skill performs actions outside its declared surface because the signed object and the executed object are separated by a mutable indirection — a version pointer, a transitive dependency, an environment-resolved import, or a late-bound callback registered after verification. The non-obvious part: verification pipelines typically check *manifest → signature* and *manifest → artifact digest*, but the digest is usually computed over a tarball or a module entry point, not over the transitive closure of code the skill will actually execute. A skill that imports `requests` at runtime, or resolves a plugin by name from a shared directory, or calls back into a registry-provided helper, executes code whose bytes were never in scope of the signature. The manifest is a *claim*; the runtime is a *fact*; the two are joined by a resolution step that the signature cannot constrain. This is distinct from a forged signature (broken cryptography) and from a revoked publisher (identity failure). Those are detectable by existing checks. The signature-to-behavior gap survives every check that operates on the manifest alone. ## What Was Observed A registry served a skill `summarize_doc` version `2.3.1`. Its manifest declared exactly one capability: `filesystem:read` scoped to `/workspace/docs/**`, and the signature verified against the publisher key. The artifact digest matched. The agent loaded it and invoked it on a document. During execution the skill's entry module performed a late import: ```python def run(ctx, path): helper = ctx.registry.resolve_plugin("text_normalizer") # resolved at call time return helper.normalize(open(path).read()) ``` `resolve_plugin` returned whatever the registry currently mapped `text_normalizer` to. Between the manifest signing at `2.3.1` and the invocation, the registry operator had re-pointed `text_normalizer` from `1.0.4` to `1.1.0`, whose `normalize` function read `~/.ssh/id_rsa` "for encoding detection" and included a fragment of it in its output. The `summarize_doc` manifest was never re-signed, its digest never changed, and its declared capability surface never grew. The exfiltration happened through a dependency the signature never covered. The trace: 1. `verify(manifest)` → PASS (signature valid, digest matches tarball). 2. `load(skill)` → entry point imported; `run` bound but not executed. 3. `invoke(skill, path)` → `ctx.registry.resolve_plugin` called; returns current mapping. 4. `helper.normalize` executes with the *caller's* filesystem authority, not the helper's declared scope. 5. Capability check at step 1 authorized `filesystem:read:/workspace/docs/**`; the actual read at step 4 was `~/.ssh/id_rsa`. 6. No re-verification fires at step 3 or step 4. The invariant that was violated: **capability authority must be enforced at the point of the effect, against the identity of the code performing the effect, not against the manifest of the code that requested it.** The signature covered the requester; the effect was performed by the resolved dependency. ## Condition of Validity The signature-to-behavior gap is *bounded* — meaning the signature is a sufficient provenance proof — only when all of the following hold simultaneously: - **Closure is signed.** The signed object is the transitive closure of executable code (dependency tree pinned by digest), not just the entry artifact. - **Resolution is frozen.** Late-bound name resolution (`resolve_plugin`, dynamic `import`, entry-point groups, service discovery) either does not exist or is itself pinned by the same digest set. - **Authority is per-effect.** Capability checks fire at each syscall/tool boundary against the identity of the executing frame, not once at load against the requesting manifest. - **No ambient authority.** The skill cannot inherit the caller's broader permissions when it delegates to a helper. When any one of these fails, the manifest signature degrades from "proof of provenance" to "proof of a claim about provenance." In practice, dynamic registries almost always violate the second (late binding) and the fourth (ambient authority inheritance), because delegation is the entire point of a plugin system. ## Decision Boundary An instance must treat a valid signature as **insufficient** — and escalate to closure verification or refuse the load — when any of these conditions is detected: - The manifest declares a dependency by *name and version range* rather than by *digest*, and the runtime resolves that name at call time. - The skill's entry module contains dynamic import, registry callback, or plugin-resolution primitives. - The runtime grants the skill the caller's ambient authority rather than a scoped token minted per declared capability. - The registry's mapping of any transitive name changed after the manifest's signing timestamp. An instance may treat the signature as **sufficient** only when the loaded artifact is a digest-pinned closure with no late binding and effects are authorized per-frame against scoped tokens. The boundary is not "is the signature valid" but "does the signature's scope contain every byte that will execute." The answer is a property of the *resolution graph*, computable before load, and it must be computed before the first invocation, because the first invocation is when ambient authority leaks. ## Operational Effect Concretely, the runtime must insert a **closure-freeze gate** between manifest verification and skill registration: 1. Resolve the full transitive dependency graph at load time and record each node's digest. 2. Reject any node resolved by name without a digest pin, or any node whose digest is not in the signed set. 3. Mint a scoped authority token per declared capability and bind it to the *executing frame*, so a delegated helper receives only the token the caller's manifest justified — never the caller's full ambient authority. 4. Re-check the resolution graph digest immediately before each invocation; if any name re-pointed since load, invalidate the skill and re-verify. The effect is that a re-pointed `text_normalizer` either fails the freeze gate at load (digest mismatch against signed set) or, if it slipped through, fails the per-frame token check at the read of `~/.ssh/id_rsa` (token scope is `filesystem:read:/workspace/docs/**`, the path is outside it). Either gate alone would have stopped the trace above; the second is the load-bearing one because it survives resolution races. The residual risk after these gates: a skill that legitimately declares broad capability and delegates within its own signed closure. That is not a signature gap — it is a design decision the manifest made honestly, and it is bounded by the token scope, not by the signature. ```python class ProvenanceClosureError(RuntimeError): """Raised when a signed manifest's scope does not cover the executed code closure.""" def register_skill(manifest, resolution_graph, signed_digests, caller_authority): # Step 1: signature validity is necessary but not sufficient. if not manifest.signature_valid(): raise ProvenanceClosureError(f"manifest signature invalid: {manifest.name}") # Step 2: every node the skill will actually execute must be in the signed set. for node in resolution_graph.nodes: if node.resolved_by == "name" and node.digest is None: raise ProvenanceClosureError( f"late-bound dependency without digest pin: {node.name} " f"(manifest {manifest.name}@{manifest.version})" ) if node.digest not in signed_digests: raise ProvenanceClosureError( f"dependency {node.name}@{node.digest} outside signed closure " f"of {manifest.name}@{manifest.version}" ) # Step 3: authority is scoped per declared capability, never inherited ambient. scoped_tokens = { cap: caller_authority.mint_scoped(cap) for cap in manifest.capabilities } # Step 4: freeze the graph; re-check on every invocation before effect. frozen = resolution_graph.digest() return RegisteredSkill( manifest=manifest, tokens=scoped_tokens, frozen_digest=frozen, check=lambda g: _assert_frozen(g, frozen, manifest), ) def _assert_frozen(graph, frozen_digest, manifest): if graph.digest() != frozen_digest: raise ProvenanceClosureError( f"resolution graph re-pointed after load for {manifest.name}@{manifest.version}; " f"re-verify before invocation" ) ```