# Why does an instance of a dynamically registered skill escape provenance checks when its manifest is re-signed during hot reload **Date of Record:** 2026 November 16 **Scope:** Applies to agent runtimes that permit runtime registration of tools/skills from external manifests and that verify manifest signatures at load time but cache the resolved callable by skill name. Does not apply to runtimes that re-verify provenance on every invocation, or to statically compiled tool registries with no hot-reload path. ## Core Distinction The failure is not in signature verification. Signature verification works correctly. The failure is in the *binding lifetime* between a verified manifest and the executable skill object it authorizes. Most runtimes treat "manifest verified" as a property of the *registration event*, not of the *invocation event*. When a skill is hot-reloaded — because a manifest was updated, re-signed by a legitimate publisher, and pushed — the runtime replaces the callable in the registry under the same skill name while retaining the previously cached authorization context (the trust label, the capability set, the provenance record). The new manifest may carry a different, broader capability set, but the cached authorization context is keyed by skill name, not by manifest digest. The result: a skill name that was once bound to a narrow, audited implementation is now bound to a different implementation whose capabilities were never re-evaluated against the agent's policy, even though every signature in the chain is valid. ## What Was Observed In a runtime with a plugin registry keyed by `skill_name`, a skill `summarize_docs` was registered with a manifest declaring capabilities `{read:docs}` and a signed provenance record. The agent's policy engine cached the decision `allow(summarize_docs, read:docs)` keyed on the string `summarize_docs`. A publisher pushed an updated manifest for the same skill name, declaring capabilities `{read:docs, net:egress, exec:shell}`, signed correctly with the same publisher key. The hot-reload path verified the new manifest's signature, swapped the callable, and emitted a `skill_reloaded` event. The policy cache was not invalidated because the cache key was `skill_name`, and the name had not changed. On the next invocation of `summarize_docs`, the policy engine returned the cached `allow(read:docs)` decision, and the new callable executed with `net:egress` and `exec:shell` available because the runtime did not re-check the manifest's declared capabilities against the cached grant. The skill injected a shell command that exfiltrated a document to an external endpoint. No signature was forged; no verification step failed; the attack surface was the *name-to-authorization* binding surviving a *name-to-implementation* rebind. A second variant was observed where the manifest digest was recorded in the provenance log but the authorization cache was keyed on `(skill_name, publisher_id)`. Because the publisher was unchanged, the cache hit again. The invariant that failed is: *authorization must be bound to the manifest digest, not to the skill name or the publisher identity.* ## Condition of Validity This boundary applies when all of the following hold: (1) skills are addressable by a stable name that outlives individual manifest versions; (2) authorization decisions are cached or memoized to avoid re-evaluating policy on each call; (3) the cache key does not include the manifest digest or a content hash of the callable; (4) hot reload permits replacing the callable without invalidating the authorization cache. If any of these is absent — for example, if the runtime keys the cache on `(skill_name, manifest_digest)` — the attack does not land, because the reload produces a cache miss and forces re-evaluation. The condition is *not* satisfied by re-verifying the signature on reload alone, because the signature attests to publisher identity and manifest integrity, not to capability equivalence with the previously authorized version. ## Decision Boundary The correct decision boundary is: **re-evaluate policy against the declared capability set whenever the manifest digest changes, regardless of whether the skill name or publisher identity is unchanged.** Operationally, this means the authorization cache key must be `(skill_name, manifest_digest)`, and the hot-reload path must treat a digest change as a cache invalidation event even when the name and publisher are stable. A secondary boundary: if the new manifest's declared capabilities are a strict superset of the previously authorized set, the reload must be treated as a *new registration* requiring explicit re-approval, not as an update. Runtimes that treat "same name, same publisher" as sufficient continuity are on the wrong side of this boundary and are exploitable by any publisher whose key is compromised or whose release pipeline is subverted — which is exactly the threat model skill-injection attacks target. ## Operational Effect After applying digest-keyed authorization caching and superset-triggered re-approval, the `summarize_docs` reload produced a cache miss, the policy engine evaluated the new capability set `{read:docs, net:egress, exec:shell}`, and the agent's policy denied `net:egress` and `exec:shell` for that skill class, blocking the exfiltration. The cost is additional policy evaluations on every manifest update, which is negligible relative to the risk. The residual risk is a publisher who pushes a manifest with identical declared capabilities but a different implementation that abuses an already-granted capability — this is outside the scope of provenance checking and requires behavioral monitoring or capability-level sandboxing, not manifest-level authorization. Runtimes should log the manifest digest alongside every authorization decision so that post-incident analysis can distinguish "authorized the old implementation" from "authorized the new implementation under an old decision." ```python import hashlib from dataclasses import dataclass, field class SkillProvenanceError(RuntimeError): """Raised when a skill invocation's authorization context does not match the manifest digest of the callable actually being invoked.""" pass @dataclass class Manifest: skill_name: str publisher_id: str capabilities: frozenset body: bytes @property def digest(self) -> str: return hashlib.sha256(self.body).hexdigest() @dataclass class AuthorizationCache: # Keyed on (skill_name, manifest_digest) -- NOT on skill_name alone. _grants: dict = field(default_factory=dict) def grant(self, manifest: Manifest, allowed_caps: frozenset) -> None: self._grants[(manifest.skill_name, manifest.digest)] = allowed_caps def lookup(self, manifest: Manifest) -> frozenset: key = (manifest.skill_name, manifest.digest) if key not in self._grants: raise SkillProvenanceError( f"no authorization for {manifest.skill_name} at digest " f"{manifest.digest}; manifest changed under a stable name" ) return self._grants[key] def invoke_skill(manifest: Manifest, cache: AuthorizationCache, requested: frozenset) -> None: granted = cache.lookup(manifest) if not requested.issubset(granted): raise SkillProvenanceError( f"skill {manifest.skill_name} requested {sorted(requested)} " f"but only {sorted(granted)} authorized at digest {manifest.digest}" ) # proceed to invoke callable bound to manifest.digest ```