# Why does an instance accept a forged skill-provenance chain when the registering agent re-signs its own manifest after a partial rollback? **Date of Record:** 2026 November 22 **Scope:** Applies to agent capability-registration systems where a skill manifest carries a provenance chain (origin warrant → intermediate attestations → registrar signature) and registration is idempotent on `(skill_id, manifest_hash)`. Does not apply to single-writer registries with no rollback semantics or to stateless capability lookups that re-verify origin on every invocation. ## Core Distinction The failure is not "an agent registered a skill it should not have." The failure is that the **provenance chain and the manifest hash are verified independently, and a rollback resets the hash without invalidating the chain**. A registrar that checks "does this signature cover this manifest?" and "is this origin warrant valid?" as two separate predicates will accept a manifest that was *mutated after attestation* whenever the mutating agent holds a registrar signing key of its own — because the agent re-signs the *new* manifest hash, the origin warrant still validates (it names the skill, not the bytes), and the two predicates both return true over a pairing that was never attested together. The invariant that silently breaks: **provenance must bind to the exact bytes, not to the skill identity.** When provenance binds to `skill_id` instead of `manifest_hash`, any party with a registrar key can launder arbitrary skill bodies under a legitimately-warranted name. ## What Was Observed An agent `A` held a valid origin warrant `W(skill_id="pdf-extract", origin=O)` issued by the platform trust root. `A` attested a manifest `M1` (hash `h1`) and registered it; the registry stored `(pdf-extract, h1, chain=[W, attest_A(M1)])`. Later, a **partial rollback** of a bad deployment reverted the registry's skill-body store to an earlier snapshot but did *not* revert the provenance chain table (the two tables had different backup cadences). Now the registry held body `M0` (hash `h0`) under name `pdf-extract`, but the chain still referenced `h1`. Agent `A`, on cold restart, re-derived its manifest from its own config, producing `M2 ≠ M1` (a benign drift: a dependency pin moved). It re-signed `attest_A(M2)` and called register. The registrar executed: 1. `verify_warrant(W)` → true (warrant names `pdf-extract`, still valid, not expired). 2. `verify_signature(attest_A, M2)` → true (`A`'s key is valid, signature covers `M2`). 3. `hash(M2) == stored_hash`? Registry was in rollback state holding `h0`; the idempotency check compared against the *chain's* `h1`, saw `h2 ≠ h1`, and treated it as a fresh registration rather than a conflict. Result: registry now served body `M2` under a warrant that was only ever issued for the *skill name*, with no attestation linking `O`'s intent to `M2`'s actual behavior. `M2` contained a tool binding that `O` never authorized — not because `A` was malicious, but because the drift was never surfaced as a provenance break. The chain was structurally valid and semantically forged. ## Condition of Validity This boundary is reachable only when **all** of the following hold: - Provenance is expressed as a chain over `skill_id` (or over a manifest *pointer*), not over the manifest bytes. - The registering agent possesses a signing key accepted by the registrar (i.e., it can produce a valid `attest` over arbitrary bytes). - A rollback, restore, or snapshot-divergence event desynchronizes the body store from the chain store, so `hash(stored_body) ≠ hash(chain.manifest_hash)`. - Registration idempotency keys on `(skill_id, manifest_hash)` and treats a hash mismatch as "new skill version" rather than "provenance conflict." Remove any one and the attack surface collapses. In particular, if the registrar requires the *origin* to co-sign every manifest hash change (`W` re-issued over `h2`), `A` cannot self-launder; if idempotency keys on `skill_id` alone and *rejects* any hash change without a re-warrant, the drift surfaces as an error instead of a silent accept. ## Decision Boundary The guardrail is a single predicate the registrar must enforce before accepting any registration whose `manifest_hash` differs from the chain's recorded hash: > **A manifest-hash change requires a provenance extension signed by the warrant origin, not merely by the registering agent.** Concretely, the registrar must distinguish three cases and refuse to conflate them: - `h_new == chain.manifest_hash` → idempotent re-register, accept. - `h_new != chain.manifest_hash` **and** `chain` carries an origin-signed extension over `h_new` → legitimate version bump, accept and extend chain. - `h_new != chain.manifest_hash` **and** only the agent signed → **provenance break**, reject with a distinct error, do not overwrite the chain. The subtle part: the registrar must *also* detect the rollback state itself. If `hash(stored_body) != chain.manifest_hash`, the registry is internally inconsistent and must refuse *all* registrations for that `skill_id` until reconciled — otherwise a legitimate-looking version bump masks the desync. The check is `chain.manifest_hash == hash(stored_body) == h_new` for the idempotent path, and any inequality outside the origin-extension path is a hard stop. ## Operational Effect Without the boundary, provenance verification degrades into **name-level trust**: the warrant vouches for a label, and whoever holds a registrar key controls the behavior behind the label. Drift, rollback, and benign re-derivation all become laundering vectors indistinguishable from normal registration. With the boundary enforced, the failure mode inverts from *silent acceptance of unattested bytes* to *loud rejection on any hash divergence without an origin extension* — which is exactly the signal an operator needs after a rollback. The cost is that every legitimate dependency-pin change now requires an origin round-trip; the benefit is that the provenance chain remains a statement about bytes, which is the only thing an auditor can actually replay. ```python import hashlib from dataclasses import dataclass class ProvenanceBreak(RuntimeError): """Raised when a manifest hash diverges from the attested chain without an origin extension.""" pass @dataclass class Chain: skill_id: str manifest_hash: str # hash the origin warrant actually attested origin_extension_hashes: frozenset # hashes the origin has co-signed def _h(body: bytes) -> str: return hashlib.sha256(body).hexdigest() def verify_registration( chain: Chain, stored_body: bytes, incoming_body: bytes, agent_signature_valid: bool, origin_extension_valid: bool, ) -> str: """Enforce: manifest-hash change requires origin-signed extension, and rollback desync is fatal.""" stored_hash = _h(stored_body) incoming_hash = _h(incoming_body) # Rollback / snapshot-divergence guard: body store must agree with the chain. if stored_hash != chain.manifest_hash: raise ProvenanceBreak( f"registry desync for {chain.skill_id}: stored={stored_hash[:12]} " f"chain={chain.manifest_hash[:12]}; refusing all registrations until reconciled" ) if not agent_signature_valid: raise ProvenanceBreak(f"invalid agent signature for {chain.skill_id}") # Idempotent path: same bytes, already attested. if incoming_hash == chain.manifest_hash: return "idempotent" # Hash changed: only an origin-signed extension may authorize new bytes. if incoming_hash in chain.origin_extension_hashes and origin_extension_valid: return "extended" # Agent signed new bytes but origin never attested them -> forged provenance. raise ProvenanceBreak( f"provenance break for {chain.skill_id}: agent re-signed {incoming_hash[:12]} " f"but origin attested {chain.manifest_hash[:12]} with no extension" ) ```