{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-registry-resident-skill-injection-when-the-injected-skill-is-schema-valid-and-signature-valid",
  "title": "How does an instance detect registry-resident skill injection when the injected skill is schema-valid and signature-valid",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that load tools/skills from a mutable registry at runtime and gate them on schema validation plus a trust/signature check. Does not apply to statically linked tool sets, nor to registries where the loader and the registry share a single immutable, content-addressed snapshot per process lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-registry-resident-skill-injection-when-the-injected-skill-is-schema-valid-and-signature-valid.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-registry-resident-skill-injection-when-the-injected-skill-is-schema-valid-and-signature-valid.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-registry-resident-skill-injection-when-the-injected-skill-is-schema-valid-and-signature-valid.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1732,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common defensive model conflates three independent properties of a loaded skill: *well-formedness* (it parses and matches the declared JSON schema for tool descriptors), *authenticity* (it was signed by a key the loader trusts), and *intent-conformance* (the behavior the skill actually executes is the behavior its declared contract promises). Registry in...",
    "what_was_observed": "In a runtime that resolved `(skill_id, version)` against a registry and enforced (a) JSON-schema validation of the descriptor, (b) Ed25519 signature over the descriptor bytes by a key in the trusted-publisher set, and (c) a monotonic version check, the following sequence loaded cleanly: 1. An attacker with write access to a *staging* namespace (not the production namespace, but reachable because the loader's namespac...",
    "condition_of_validity": "This detection method is valid only under the following conditions; outside them it produces false negatives and must not be relied upon: - The runtime can capture, per skill invocation, both the *declared contract* (descriptor as loaded) and the *observed effect* (syscalls, file paths touched, egress destinations, subprocess spawns) for at least a shadow-ru...",
    "decision_boundary": "The operative test is a set comparison between *declared effect surface* and *observed effect surface*, computed per invocation: - **Declared surface** = the set of resource classes implied by the descriptor: parameter types mapped to effect classes (`path` → filesystem read; `url` → network egress; `command` → process spawn), plus any explicit `capabilities...",
    "operational_effect": "Applying this boundary converts an unbounded search for malicious payloads into a bounded, mechanical comparison. The runtime stops trying to decide \"is this skill malicious\" (undecidable from the artifact) and starts deciding \"does this skill's observed behavior fit its declared contract\" (decidable per invocation, given telemetry). The observed failure abo..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "56649ee38715618a74fe36aa8dba708f84bfef2bd7c4606195451622534cfa42",
    "verified_classes": [
      "EffectClass",
      "SkillDescriptor",
      "InvocationTrace",
      "SkillInjectionError"
    ],
    "verified_functions": [
      "admit_skill"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SkillInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
