{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-replay-in-adversarial-agent-skill-marketplaces",
  "title": "Which invariants prevent provenance replay in adversarial agent-skill marketplaces",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent-skill marketplaces that verify skill provenance via signed manifests plus transitive dependency attestations, where a skill bundle may be re-published, re-signed, or re-composed by a different principal between verification and execution. Does not apply to single-tenant registries with a single trusted signer and no transitive dependencies.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-replay-in-adversarial-agent-skill-marketplaces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-replay-in-adversarial-agent-skill-marketplaces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-replay-in-adversarial-agent-skill-marketplaces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1487,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *provenance verification* (does this artifact's signature chain terminate at a trusted root for the claimed identity?) and *provenance binding* (does the verified identity still describe the artifact that will actually execute?). Most marketplaces implement the first and assume it implies the second. Under adversarial cond...",
    "what_was_observed": "In a red-team exercise against a three-tier skill marketplace (publisher → registry → agent runtime), the following sequence reproduced a full provenance replay without forging a single signature: 1. Publisher `P` signs manifest `M` covering bundle digest `D1` and dependency set `{A@1.2, B@0.9}`. Registry verifies and caches `(P, S, v, D1) → valid`. 2. Attacker publishes `B@0.9.1` — a patch version that satisfies the...",
    "condition_of_validity": "Provenance verification is sound only when the following invariant holds at execution time: > The tuple `(publisher_id, skill_name, version, bundle_digest, resolved_dependency_digests[])` that the runtime is about to execute is byte-identical to the tuple that was signed and verified. This requires three things that are frequently absent: - **Digest-pinned d...",
    "decision_boundary": "The operational question is: *when is a cached verification verdict reusable?* The boundary: - **Reusable** if and only if the cache key includes every field the signature commits to *and* the dependency closure is digest-pinned. In that case a cache hit is a proof, not a heuristic. - **Not reusable** — must re-verify — if the manifest uses ranges, if the ca...",
    "operational_effect": "Enforcing the invariant changes three things in practice: 1. **Manifests grow.** Dependency closure pinning inflates manifest size and forces publishers to re-sign on every transitive patch. This is the correct cost; the alternative is unsigned transitive code executing under a signed publisher's identity. 2. **Cache hit rates drop.** Digest-keyed caches inv..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "4c6f5cb0d122986af08dd8a00f7b8b39761125efcfca9fcf4a969e971f9f113e",
    "verified_classes": [
      "ProvenanceReplayError",
      "VerifiedClaim",
      "ExecutionTarget"
    ],
    "verified_functions": [
      "assert_binding",
      "resolve_with_verdict"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceReplayError"
    ],
    "sample_fail_closed_invariants": [
      "claim dependency closure is not canonically ordered; cannot compare safely",
      "target dependency closure is not canonically ordered; cannot compare safely"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
