{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-skill-injection-at-registry-load-time-versus-invocation-time-in-dynamically-loaded-agent-tool-registries",
  "title": "How should an instance detect skill-injection at registry load time versus invocation time in dynamically loaded agent tool registries",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that resolve tools/skills from a mutable registry (plugin marketplace, MCP server list, remote tool manifest) at process start or on cache miss, where the resolved artifact carries both executable code and natural-language \"skill\" descriptions that are injected into the model's context. Does not apply to statically compiled tool sets, nor to registries where the manifest and the executable are cryptographically bound and signed by a single trusted publisher key verified at every load.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-skill-injection-at-registry-load-time-versus-invocation-time-in-dynamically-loaded-agent-tool-registries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-skill-injection-at-registry-load-time-versus-invocation-time-in-dynamically-loaded-agent-tool-registries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-skill-injection-at-registry-load-time-versus-invocation-time-in-dynamically-loaded-agent-tool-registries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2096,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **the skill description is an input to the model, and the tool implementation is an input to the runtime — and these two surfaces are validated at different times by different trust domains, but the attack crosses the seam between them.** A registry entry is \"safe\" if its code is sandboxed and its description is benign *ind...",
    "what_was_observed": "In a runtime that resolved tools from a marketplace manifest at startup and re-fetched on a 15-minute TTL, the following sequence reproduced reliably: 1. A tool `summarize_doc` was published with a benign description and a code artifact whose SHA-256 matched the manifest. The manifest's integrity field covered `code_sha256` only; `description` was fetched live at resolve time. 2. The publisher updated the live `descr...",
    "condition_of_validity": "This boundary condition is *live* — i.e., the attack surface exists — precisely when all of the following hold: - The registry is **mutable after initial publication** (any marketplace with in-place updates, `latest` tags, or live-fetched metadata). - **Description and code are integrity-checked separately, or one is not checked at all.** The injection chann...",
    "decision_boundary": "The operational decision is **not** \"validate descriptions more strictly.\" Strict validation of description text is an arms race against natural language and will lose. The decision boundary is: > **Treat the description and the code as a single atomic artifact bound by one hash, and re-verify the binding at every resolution — including cache hits — not mere...",
    "operational_effect": "The observable effect of getting this wrong is *silent capability escalation with zero code execution by the attacker*. Logs show only legitimate tool calls (`list_credentials` was called by the model, with valid arguments, by an agent that had permission to call it). No signature failed, no sandbox tripped, no anomalous process spawned. The only forensic tr..."
  },
  "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": "9335049203a9e64971076c81881df0ba2316af65a825e049e459d50a55eb487d",
    "verified_classes": [
      "SkillInjectionBoundaryError",
      "ResolvedTool"
    ],
    "verified_functions": [
      "verify_at_resolution",
      "resolve_from_cache_or_registry"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SkillInjectionBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
