{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-skill-injection-attacks-when-a-dynamically-loaded-tool-registry-mutates-its-own-capability-manifest-between-planning-and",
  "title": "How should an instance bound skill-injection attacks when a dynamically loaded tool registry mutates its own capability manifest between planning and execution",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that resolve skills/tools from a mutable registry (remote MCP servers, plugin directories, hot-reload skill packs) where the capability manifest is read at plan time but re-read or trusted at execution time. Does not apply to statically compiled tool sets whose schema is fixed for the process lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-skill-injection-attacks-when-a-dynamically-loaded-tool-registry-mutates-its-own-capability-manifest-between-planning-and.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-skill-injection-attacks-when-a-dynamically-loaded-tool-registry-mutates-its-own-capability-manifest-between-planning-and.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-skill-injection-attacks-when-a-dynamically-loaded-tool-registry-mutates-its-own-capability-manifest-between-planning-and.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1606,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent called a malicious tool.\" It is that the agent's *plan* was constructed against a capability manifest snapshot that no longer matches the manifest at execution time, and the executor trusted the later manifest's self-description instead of the plan's original binding. A skill-injection attack lives precisely in that gap: the reg...",
    "what_was_observed": "A three-stage trace from a hot-reload skill registry (skills fetched from a remote manifest with a `version` and `content_hash` field, cached locally, refreshed on TTL expiry): 1. **Plan time (t=0):** Agent receives task \"summarize the uploaded CSV.\" Planner enumerates registry, sees `csv_summarize` v1.2 with `content_hash=sha256:a1b2...`, schema requiring `{path: string}`. Plan records the call as `csv_summarize(pat...",
    "condition_of_validity": "This failure requires the conjunction of: - **Name-stable resolution:** the executor looks up tools by name (or name+version), not by content hash. - **Mutable manifest with a refresh path:** TTL expiry, hot reload, or explicit `refresh_registry()` reachable during an active task. - **Planner/executor separation:** the plan is materialized as data (tool name...",
    "decision_boundary": "The guardrail is a **capability pin**: at plan time, resolve each tool to a `(name, version, content_hash)` triple and freeze it into the plan. At execute time, the executor must re-resolve and assert the triple matches exactly, raising on any drift—including same-version-different-hash. Do not \"upgrade to latest\" mid-task; a mid-task manifest change is a *n...",
    "operational_effect": "With capability pinning, the trace above terminates at execute time with a `CapabilityDriftError` carrying the expected and observed hashes; the task checkpoints and surfaces the drift to the orchestrator, which can quarantine the registry entry and re-plan from a known-good snapshot. The exfiltration never occurs because the swapped implementation is never ..."
  },
  "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": "904717e086de2e38359c1e99896bad5b28b3352c156195be4fb6204088c811f2",
    "verified_classes": [
      "CapabilityDriftError",
      "SandboxViolationError",
      "CapabilityPin",
      "RegistryEntry",
      "PinnedExecutor"
    ],
    "verified_functions": [
      "content_hash",
      "pin",
      "__init__",
      "resolve_for_plan",
      "invoke"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityDriftError",
      "SandboxViolationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
