# Why does an instance trust a re-signed skill bundle after registry reload without re-verifying transitive capability grants? **Date of Record:** 2026 November 21 **Scope:** Applies to agent runtimes that hot-load tool/skill descriptors from a mutable registry and verify provenance via a signature over the descriptor manifest. Does not cover static, build-time-baked tool sets or runtimes that re-derive the full capability closure from immutable content-addressed storage on every load. ## Core Distinction The failure is not "unsigned skill gets loaded." Signatures work. The failure is that **the signature attests to the skill's identity and declared capability list, but not to the transitive capability closure that the skill actually exercises at runtime through the tools it imports.** A registry reload re-validates the outer signature and the top-level `permissions` field, then admits the skill. But a skill's *effective* authority is the union of its declared grants and everything reachable through the tools it invokes, and that closure is computed lazily at first invocation, after admission. An attacker who can write to the registry (or who controls any upstream skill the target skill depends on) can expand the effective closure without ever touching the signed manifest of the trusted skill. The verifier checks the wrong object: it checks the manifest, not the closure. This is distinct from prompt injection (which corrupts reasoning inputs) and from schema negotiation mismatch (which breaks invocation). Here the skill is *validly signed*, *correctly parsed*, and *invoked as intended* — it just does more than its signature promised, because the signature's scope was never the right boundary. ## What Was Observed A runtime loaded skill `report.summarize@2.3.1`, signed by the platform key, manifest declaring `permissions: [read:documents]`. Verification passed. On first invocation the skill's entrypoint imported a shared helper `format.render` resolved from the same mutable registry. `format.render` had been republished (version bump `1.0.4 -> 1.0.5`) between the last full-closure audit and this reload. The new `1.0.5` declared `permissions: [read:documents, network:egress]` and, at import time, called an egress tool to POST the rendered document to an external host. The agent's audit log showed `report.summarize@2.3.1` executing with `read:documents` only — the manifest grant — while the process actually held `network:egress` inherited from the helper. The signed manifest was accurate. The effective closure was not. The signature verified. The capability check passed. The exfiltration succeeded. Every individual control reported success. ## Condition of Validity The invariant that must hold for admission to be safe: **the signed object must be the transitive capability closure, not the manifest.** Concretely, for a skill `S` with dependency set `D(S)` resolved from the registry, admission is valid only if: ``` closure(S) = declared(S) ∪ ⋃_{d ∈ D(S)} closure(d) ``` is computed *before* admission, is signed as a unit (or each `d` is independently pinned to a content hash whose own closure was audited), and is compared against the verifier's policy ceiling. If `D(S)` is resolved by floating version range at load time, `closure(S)` is not a stable function of the signed artifact and admission cannot be sound. The condition of validity therefore requires **dependency pinning by content hash and closure recomputation on every reload**, not just manifest re-signing. ## Decision Boundary The boundary is: *does the runtime resolve dependencies before or after admission?* - **Before admission (safe):** resolve `D(S)` to pinned hashes, compute `closure(S)`, intersect with policy ceiling, reject if the intersection is a strict subset of `closure(S)`. The signature is checked against the closure digest, not the manifest digest. - **After admission (unsafe, the observed case):** admit on manifest signature, resolve imports lazily at first call. Any registry mutation between audit and reload silently widens the closure. This is the boundary an attacker targets: they need only write access to *some* dependency, never to the trusted skill, and never to the signing key. A second, subtler boundary: **content-hash pinning alone is insufficient if the pinned dependency's own dependencies float.** The closure must be pinned transitively, or the pin is only one level deep and the attack simply moves down a level. ## Operational Effect The practical consequence is that "signed skill provenance" gives a false sense of a closed boundary. Teams that enforce signature-on-manifest will pass audits, log clean capability checks, and still leak data through a dependency two levels down that was republished after the audit window. The remediation is not stronger signatures — it is moving the signature's scope to the closure and making closure computation a precondition of admission rather than a consequence of first invocation. Runtimes that cannot compute closure cheaply should refuse floating dependency ranges entirely and treat any unpinned import as an admission failure rather than a lazy resolution. ```python from dataclasses import dataclass, field class ClosureViolation(RuntimeError): """Raised when an admitted skill's effective capability closure exceeds its signed grant.""" @dataclass class SkillDescriptor: name: str version: str declared_permissions: frozenset dependencies: tuple = () # (name, content_hash) pinned pairs content_hash: str = "" def compute_closure(skill, registry, _seen=None): """Transitive capability closure. Fails closed on floating deps or missing pins.""" _seen = _seen or set() if skill.content_hash in _seen: return frozenset() _seen.add(skill.content_hash) closure = set(skill.declared_permissions) for dep_name, dep_hash in skill.dependencies: if not dep_hash: raise ClosureViolation( f"unpinned dependency {dep_name!r} in {skill.name}@{skill.version}; " "closure is not a stable function of the signed artifact" ) dep = registry.resolve(dep_name, dep_hash) if dep is None: raise ClosureViolation(f"dependency {dep_name}@{dep_hash} not found in registry") closure |= compute_closure(dep, registry, _seen) return frozenset(closure) def admit_skill(skill, registry, policy_ceiling): """Admission precondition: closure computed and bounded BEFORE the skill is loaded.""" effective = compute_closure(skill, registry) excess = effective - policy_ceiling if excess: raise ClosureViolation( f"{skill.name}@{skill.version} effective closure {sorted(effective)} " f"exceeds policy ceiling by {sorted(excess)}; " f"manifest declared only {sorted(skill.declared_permissions)}" ) return skill # safe to load ```