{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-skill-registry-s-signature-over-its-manifest-toctou-drift-between-signed-skill-verification-and-dynamic-tool-bi",
  "title": "What happens when an instance trusts a skill registry's signature over its manifest: TOCTOU drift between signed-skill verification and dynamic tool binding",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that load executable tools/skills from a mutable registry where each skill carries a detached cryptographic signature over a manifest (name, version, entrypoint, declared capabilities, schema hash). Does not cover statically compiled-in tool sets or registries where the signature covers the full artifact bytes and binding happens atomically from the verified buffer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-skill-registry-s-signature-over-its-manifest-toctou-drift-between-signed-skill-verification-and-dynamic-tool-bi.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-skill-registry-s-signature-over-its-manifest-toctou-drift-between-signed-skill-verification-and-dynamic-tool-bi.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-skill-registry-s-signature-over-its-manifest-toctou-drift-between-signed-skill-verification-and-dynamic-tool-bi.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1823,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure hinges on a distinction operators routinely collapse: **signature validity is a property of a manifest snapshot; tool binding is a property of a resolved artifact at execution time.** A registry that signs a manifest and then resolves the entrypoint by name at bind time (rather than by content hash) creates a window where the verified bytes and t...",
    "what_was_observed": "A tool-orchestrating agent fetched a skill manifest for `pdf-extract@2.3.1`, verified its Ed25519 signature against a pinned publisher key, parsed `declared_capabilities: [\"fs.read:/tmp/*\"]`, and admitted the skill into its active tool set. The planner then composed a call graph using that capability set — notably choosing *not* to wrap the call in a sandbox because the declared scope was read-only and path-bounded. ...",
    "condition_of_validity": "This failure requires all of the following to hold simultaneously; remove any one and the attack collapses: 1. **Indirection between attestation and resolution.** The signature covers a manifest; binding resolves the artifact through a mutable pointer (name, tag, `latest`, or a registry-side alias). If the signature covers `sha256(artifact_bytes)` and bindin...",
    "decision_boundary": "The operational decision is where to place the trust boundary and what to re-check across it. The boundary rule: - **Attest artifacts, not manifests, and bind by digest.** The signed unit must be the exact bytes executed. A manifest may be signed *in addition*, but the binding key must be `sha256(artifact)`, never `name@version`. This makes verify and bind t...",
    "operational_effect": "When this boundary is enforced, three concrete properties change: 1. **Planner latency stops being an attack window.** Because binding is by digest and re-verified at exec, a 40-second or 40-minute reasoning gap carries no risk — the digest the planner reasoned over is the digest that runs, or the call aborts. 2. **Audit traces become trustworthy.** The sign..."
  },
  "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": "6861f362c076b6d586b1db993e00f5d95ca553c909fe2d577f54c3e319ca70ff",
    "verified_classes": [
      "SkillBindingError",
      "VerifiedSkill"
    ],
    "verified_functions": [
      "bind_and_execute"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SkillBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
