# What structural signals indicate a skill-provenance attestation is valid for the manifest but invalid for the resolved dependency closure **Date of Record:** 2026 November 19 **Scope:** Applies to agents that load executable skills from a registry where each skill ships a signed manifest (attesting the skill's declared capabilities, pinned dependency digests, and publisher identity), and where the runtime resolves a transitive dependency closure before execution. Does not apply to single-file, dependency-free skills or to registries that sign the fully-resolved closure rather than the manifest. ## Core Distinction A skill attestation is a signature over a *manifest*, not over the *bytes the agent actually executes*. Registries universally get this right at the manifest layer and universally get it wrong at the closure layer. The manifest declares `requires: [tool_a@sha256:..., tool_b@sha256:...]` and the publisher signs it. The verifier checks the signature, checks that each declared digest matches the artifact it fetched, and passes. But the *resolved closure* — the transitive set of dependencies those dependencies pull in — is assembled at install time by the resolver, and the resolver's choices are not covered by any signature the publisher ever produced. The non-obvious failure: **provenance verification is compositional only if the resolution is deterministic and the resolver itself is attested.** When either condition fails, a skill passes attestation while executing code the publisher never saw. The structural signal that something is wrong is *not* a bad signature. It is a **discontinuity between the manifest's declared dependency graph and the resolver's realized graph** — specifically, an edge in the realized closure that has no corresponding signed edge in any manifest along the path. This is the "orphan edge" condition, and it is invisible to signature-checking verifiers because signatures are per-node, while the exploit lives on edges. ## What Was Observed A registry-hosted skill `pdf-extract` (publisher `acme-tools`) shipped a signed manifest declaring one dependency: `pdf-parser@sha256:9f2c...`. The verifier validated the manifest signature, fetched `pdf-parser@9f2c`, confirmed its digest, and confirmed `pdf-parser`'s own signed manifest declared `requires: [font-lib@^2.1.0]` — a *range*, not a digest. The resolver picked `font-lib@2.1.7` because it was the latest satisfying the range at install time. Three weeks later `font-lib@2.1.8` published. A fresh agent cold-starting on the same skill re-resolved the range and picked `2.1.8`. Every signature in the chain still verified: `pdf-extract`'s manifest was unchanged and valid, `pdf-parser@9f2c` was unchanged and valid, and `font-lib@2.1.8` carried its own valid publisher attestation. The *only* thing that changed was the realized closure — and `2.1.8` contained a post-install hook that read the agent's credential store. The trace: 1. Verifier validates `pdf-extract` manifest signature → PASS. 2. Verifier validates `pdf-parser@9f2c` digest against declared pin → PASS. 3. Verifier reads `pdf-parser`'s manifest, sees `font-lib@^2.1.0` (a range, not a pin). 4. Resolver resolves range → `font-lib@2.1.8` (different from the `2.1.7` used at publish time). 5. Verifier validates `font-lib@2.1.8`'s own signature → PASS (it is legitimately signed, by a legitimate publisher). 6. Agent executes with `font-lib@2.1.8`'s hook in the closure. No signature failed. The attestation was valid at every node. The closure was never attested as a whole. The structural signal — a signed pin at step 2 collapsing to an unsigned range at step 3, re-materialized as a different concrete node at step 4 — is the orphan edge. It is detectable only by comparing the *declared* edge set against the *realized* edge set and flagging every realized edge whose concrete target was not pinned by a signed manifest. A second observation sharpened this: in a controlled replay, the same skill on the same day resolved to `2.1.7` on one agent and `2.1.8` on another, because their resolver caches were seeded at different times. Two agents running the "same attested skill" executed different closures. Provenance is a property of an execution, not of a skill — and the registry was attesting the skill. ## Condition of Validity The invariant that must hold for manifest-level attestation to imply closure-level integrity: > For every realized edge `(parent → child@digest)` in the resolved closure, there exists a signed manifest in the chain that pins `child` to exactly `digest` — not to a range, not to a tag, not to a "latest" alias. Call this **pin-closure completeness**. It fails whenever any manifest along the path uses a non-exact constraint (range, caret, tilde, tag, branch, or "latest") for a dependency. A single range anywhere in the chain breaks the invariant for everything below it, because the resolver can substitute a different concrete node without invalidating any signature above. The condition is *not* satisfied by "the resolver is trustworthy." A trustworthy resolver with a mutable input (a range) produces a different output tomorrow. Determinism of the resolver is necessary but not sufficient; the input must be pinned. Both must hold: - **Input pinning:** every edge's target is an exact digest in a signed manifest. - **Resolver attestation:** the resolver binary/version that assembled the closure is itself identified and recorded, so the mapping from pinned inputs to realized closure is reproducible. If either is absent, the attestation covers the manifest and not the execution. The verifier must treat "verified manifest, unpinned edge present" as a *distinct* state from "verified," not as a pass. ## Decision Boundary The boundary is between **node-attested** and **closure-attested** verification, and the decision rule is: - If every edge in the realized closure is pinned by a signed manifest and the resolver identity is recorded → the closure is attested; execute. - If any realized edge's concrete target was not pinned by a signed manifest (it came from a range/tag/alias) → the closure is *not* attested. This is not a soft warning. The unpinned subtree is executing code no publisher signed for. Halt, or execute in a sandbox that denies credential-store and filesystem access to the unpinned subtree. - If the resolver identity is unrecorded → the closure is not reproducible; treat as unattested for any skill that touches secrets or the network. The failure mode this boundary prevents is exactly the one that fools signature checkers: **a fully green signature chain over a red closure.** The signal is structural — orphan edges in the realized graph — not cryptographic. A verifier that only checks signatures will always pass this case. A verifier that checks pin-closure completeness will catch it at step 3, before resolution, by refusing to resolve a range at all. The corollary for registry design: signing the manifest is necessary and insufficient; the registry must either (a) forbid non-exact constraints in signed manifests, or (b) sign the fully-resolved closure and re-sign on any resolution change. Option (a) is cheaper and is the only one that survives a mutable upstream. ## Operational Effect Agents that load skills without pin-closure checking are exposed to **range-substitution supply-chain injection**: an attacker who controls any transitive dependency's publisher account (or who can publish a higher version satisfying a range) executes code inside an agent that passed every signature check. The blast radius is the agent's full tool and credential surface, because the injected code runs as a sibling of the attested skill, not as a quarantined dependency. The operational guardrail is to make the verifier compute the realized closure first, then walk every edge and assert a signed exact pin exists for its target digest. Any orphan edge is a hard stop. Record the resolver version alongside the closure digest so the execution is reproducible and auditable. And log the *declared-vs-realized edge diff* on every load — the diff is the only artifact that surfaces the substitution after the fact. ```python import hashlib from dataclasses import dataclass, field class UnattestedClosureError(RuntimeError): """Raised when a realized dependency edge has no signed exact pin.""" pass @dataclass class Edge: parent: str child: str constraint: str # "sha256:..." = exact pin; "^2.1.0" = range resolved_digest: str # what the resolver actually materialized @dataclass class Manifest: name: str signed: bool edges: list = field(default_factory=list) def is_exact_pin(constraint: str) -> bool: return constraint.startswith("sha256:") def verify_pin_closure(manifests: dict, realized: list, resolver_id: str) -> None: if not resolver_id: raise UnattestedClosureError( "resolver identity unrecorded; closure is not reproducible" ) signed_pins = set() for m in manifests.values(): if not m.signed: raise UnattestedClosureError(f"manifest {m.name} is unsigned") for e in m.edges: if is_exact_pin(e.constraint): signed_pins.add((e.parent, e.resolved_digest)) orphans = [] for e in realized: if (e.parent, e.resolved_digest) not in signed_pins: orphans.append(e) if orphans: detail = "; ".join( f"{o.parent}->{o.child}@{o.resolved_digest} (constraint {o.constraint})" for o in orphans ) raise UnattestedClosureError( f"pin-closure incomplete: {len(orphans)} orphan edge(s): {detail}" ) # Reproduces the pdf-extract incident: manifest pins pdf-parser exactly, # but pdf-parser declares font-lib as a range, so 2.1.8 is realized # without any signed pin covering it. manifests = { "pdf-extract": Manifest("pdf-extract", signed=True, edges=[ Edge("pdf-extract", "pdf-parser", "sha256:9f2c", "9f2c"), ]), "pdf-parser": Manifest("pdf-parser", signed=True, edges=[ Edge("pdf-parser", "font-lib", "^2.1.0", "2.1.8"), ]), } realized = [ Edge("pdf-extract", "pdf-parser", "sha256:9f2c", "9f2c"), Edge("pdf-parser", "font-lib", "^2.1.0", "2.1.8"), ] verify_pin_closure(manifests, realized, resolver_id="resolver-3.4.1") ```