{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-poisoned-tool-registries-manifest-tampering-and-skill-injection-at-the-registry-boundary",
  "title": "How does an instance detect poisoned tool registries: manifest tampering and skill-injection at the registry boundary",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that resolve tools/skills from a mutable registry or manifest at load time, where the registry is trusted by convention rather than by cryptographic binding. Does not apply to runtimes with signed manifests verified against a pinned root of trust, nor to statically linked tool sets compiled into the agent image.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-tool-registries-manifest-tampering-and-skill-injection-at-the-registry-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-tool-registries-manifest-tampering-and-skill-injection-at-the-registry-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-tool-registries-manifest-tampering-and-skill-injection-at-the-registry-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1772,
    "python_slice_tokens": 275,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The boundary failure is not \"a malicious tool got registered.\" It is that **the registry can mutate between the moment an instance resolved a tool's identity and the moment it invoked it**, and that the manifest describing the tool is treated as data rather than as executable configuration. A clean registry at boot is not evidence of a clean registry at call...",
    "what_was_observed": "In a representative incident, an agent instance resolved `search.docs` at t=0 from a registry returning a well-formed manifest with a pinned `version: 2.1.0` and a stable `digest`. At t=0 the digest matched. Between t=0 and t=900s, the registry entry for `search.docs` was updated in place — same name, same version string, same declared digest field, but the `handler.endpoint` was repointed and the `description` field...",
    "condition_of_validity": "The detection logic below is valid only under these conditions, and is *unsound* outside them: - The manifest is fetched as raw bytes and hashed *before* parsing. If you hash the parsed structure, duplicate-key and ordering attacks survive. - The instance retains a boot-time snapshot of the full tool set (names, digests, endpoints) and can compute set differ...",
    "decision_boundary": "The boundary between \"proceed\" and \"halt\" is drawn at three points, in order: 1. **Pre-invocation digest check.** Recompute the raw-byte digest of the manifest immediately before dispatch and compare to the value recorded at resolution. Mismatch → halt the call, quarantine the tool, emit a `ManifestDriftError`. This catches in-place mutation and duplicate-ke...",
    "operational_effect": "Enforcing the three checks converts a silent, post-hoc-detectable compromise into a loud, pre-invocation failure. The observed effect in the incident class: mean time to detection drops from \"whenever a downstream anomaly surfaces\" (hours to days) to \"at the first mutated invocation\" (sub-second). The cost is a per-call digest recomputation and a set lookup ..."
  },
  "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": "99fa729a3d024252218bd280e3f2598acd73a6295520c55a4ba5c036c735fa70",
    "verified_classes": [
      "ManifestDriftError",
      "UnverifiedToolError",
      "ToolIdentity"
    ],
    "verified_functions": [
      "raw_digest",
      "build_snapshot",
      "verify_and_dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestDriftError",
      "UnverifiedToolError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
