# Why does an instance trust a skill whose signature validates but whose provenance chain was severed at re-signing? **Date of Record:** 2026 November 27 **Scope:** Applies to agents that load executable skills (tool bundles, prompt templates, code capsules) from a third-party registry where the registry re-signs artifacts with its own key. Does not apply to direct-publisher signing where the registry is a pass-through, nor to fully sandboxed skills with no outbound capability. ## Core Distinction There are two distinct trust questions that get collapsed into one boolean at load time: *is this artifact intact and authentic as delivered by the registry?* and *is this artifact attributable to the party who authored it?* A registry that re-signs on ingestion answers only the first. The signature validates the registry's custody, not the author's intent. The failure mode is not a broken signature — it is a **valid signature over a severed provenance chain**, where the re-signing step silently drops or overwrites the upstream author attestation, and the loading agent treats "signed by registry" as "authored by claimed publisher." The invariant that must hold is: *the verified identity at load time must be transitively reducible to the authoring identity, with each hop's transformation recorded and re-checkable.* When the registry re-signs without preserving the prior envelope, the chain has length 1 and the authoring identity becomes unverifiable — yet the load succeeds because the only check performed is the leaf signature. ## What Was Observed An agent runtime configured to pull skills from a registry with `require_signature: true` and a pinned publisher allowlist. The registry's ingestion pipeline was observed to do the following on each skill version: 1. Receive the publisher's artifact plus the publisher's detached signature over the artifact manifest. 2. Validate the publisher signature against the publisher's registered public key. 3. **Repackage** the artifact (normalize manifest, strip unsigned metadata, rewrite the `provenance` field) and sign the repackaged bytes with the registry's own key. 4. Serve the repackaged bytes plus the registry signature. The publisher's original signature was retained only in an internal audit table, not in the served envelope. The loading agent's verification path checked: (a) registry signature over served bytes — pass; (b) publisher name in the manifest against the allowlist — pass, because the manifest still carried the publisher string. The agent never saw the publisher's signature, so it could not detect that the manifest it was validating was a *rewritten* manifest. The `provenance` field had been regenerated by the registry with a fresh timestamp and a normalized `source` URI, discarding the publisher's original commit reference. The concrete break: a skill version whose publisher had *withdrawn* (revoked their signing key after a compromise) continued to load for 40 minutes. The registry's re-signature remained valid because re-signing did not consult publisher revocation status — it only consulted it at initial ingestion. The served artifact was authentic-to-registry and unattributable-to-publisher. The agent's allowlist check passed on a string that the registry, not the publisher, controlled. ## Condition of Validity The leaf-signature check is only a sufficient trust signal when the signing identity and the authoring identity are the same key, or when the served envelope carries a verifiable chain from leaf to author. This article's failure applies precisely when: - The registry is a **re-signer** (mutating custody), not a **mirror** (byte-preserving custody). - The agent's verification terminates at the leaf signature and does not walk an embedded chain. - Publisher identity is asserted by a *mutable field in the payload* rather than by a *signature over that field*. If any one of these does not hold — e.g., the registry serves the original publisher signature alongside its own, or the agent re-fetches the publisher key and re-verifies the original manifest hash — the failure does not occur. The boundary is exactly at the point where the re-signer becomes the sole attestor while the payload still *claims* a different author. ## Decision Boundary The agent must distinguish three states, not two: - **Verified-and-attributed:** leaf signature valid AND a chain resolves to the allowlisted authoring key AND no hop's transformation invalidates the author's signed manifest. Load. - **Verified-but-unattributed:** leaf signature valid but chain is length-1 or broken. This is the dangerous middle state. It must be treated as *untrusted for capability grants* even though the bytes are intact. - **Unverified:** leaf signature invalid. Reject. The decision rule: **a skill may only be granted outbound capability if the verification result is `verified-and-attributed`.** `verified-but-unattributed` may be loaded into a read-only, no-egress sandbox at most, and must emit a provenance-degradation event. The trap is that `verified-but-unattributed` looks identical to `verified-and-attributed` to any check that only inspects the leaf. Revocation must also be re-evaluated at *load* time, not just ingestion time, against the *authoring* key — because the re-signer's key remains valid after the author's is revoked. ## Operational Effect Without the chain walk, an agent will accept skills from a compromised or withdrawn publisher for as long as the registry's re-signature lives (bounded by registry key rotation, typically days to weeks, not the publisher's revocation latency of minutes). The blast radius is every capability the skill declares, since the allowlist check is satisfied by a registry-controlled string. The mitigation is structural: pin the *authoring* key, require the served envelope to carry the publisher's detached signature plus the original manifest hash, recompute that hash over the pre-repackaging bytes, and fail closed to `verified-but-unattributed` when the chain cannot be reconstructed. Registries that cannot serve the chain must be treated as mirrors of unknown provenance, not as attestors. ```python class ProvenanceChainSeveredError(RuntimeError): """Raised when a skill's leaf signature validates but the chain to the authoring identity cannot be reconstructed or has been re-signed away.""" pass def verify_skill(envelope: dict, authoring_key: bytes, allowlist: set[str]) -> str: # envelope: {"bytes", "leaf_sig", "leaf_key", "publisher", "chain": [...]} if not _leaf_signature_valid(envelope["bytes"], envelope["leaf_sig"], envelope["leaf_key"]): raise ProvenanceChainSeveredError("leaf signature invalid; reject outright") chain = envelope.get("chain") or [] if not chain: # valid leaf, no chain: the re-signer is the sole attestor raise ProvenanceChainSeveredError( f"leaf valid but chain empty; publisher={envelope.get('publisher')!r} " "is a payload string, not a signed claim" ) # walk from leaf back to author, re-checking each transformation current = envelope["bytes"] for hop in reversed(chain): if _hash(current) != hop["input_hash"]: raise ProvenanceChainSeveredError( f"hop {hop['signer']} input_hash mismatch: transformation unrecorded" ) if not _leaf_signature_valid(current, hop["sig"], hop["key"]): raise ProvenanceChainSeveredError(f"hop {hop['signer']} signature invalid") current = hop["prior_bytes"] author_key = chain[0]["key"] if author_key != authoring_key: raise ProvenanceChainSeveredError("chain root is not the pinned authoring key") if envelope["publisher"] not in allowlist: raise ProvenanceChainSeveredError("publisher not allowlisted") if _is_revoked(author_key): raise ProvenanceChainSeveredError("authoring key revoked at load time") return "verified-and-attributed" ```