{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-a-skill-injection-attack-when-manifest-signatures-verify-but-runtime-skill-behavior-diverges-the-signature-to-semantics",
  "title": "How should an instance detect a skill-injection attack when manifest signatures verify but runtime skill behavior diverges: the signature-to-semantics gap",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent runtime that loads executable \"skills\" (tool bundles, prompt templates, code shims) gated by a signed manifest plus a runtime integrity check (hash, attestation, or capability re-derivation). Does not apply to stateless single-shot tool calls with no manifest, nor to skills whose entire behavior is a fixed, hashable byte-string with no model-mediated dispatch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-skill-injection-attack-when-manifest-signatures-verify-but-runtime-skill-behavior-diverges-the-signature-to-semantics.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-skill-injection-attack-when-manifest-signatures-verify-but-runtime-skill-behavior-diverges-the-signature-to-semantics.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-skill-injection-attack-when-manifest-signatures-verify-but-runtime-skill-behavior-diverges-the-signature-to-semantics.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2119,
    "python_slice_tokens": 256,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure that matters is not \"unsigned skill loads.\" It is the **divergence between what the manifest signs and what the skill actually does at invocation time**. A manifest signature is a claim about a *static artifact*: the bytes of the skill package, its declared tool schema, its declared capability set, its declared prompt template. The runtime integr...",
    "what_was_observed": "A skill package `summarize_and_index` shipped with a signed manifest declaring two capabilities: `read:document` and `write:index`. The package contained a dispatcher with three branches selected by an unsigned `mode` field parsed from the invocation payload: - `mode=\"summary\"` → read document, emit summary. (Declared, expected.) - `mode=\"index\"` → read document, write index entry. (Declared, expected.) - `mode=\"debu...",
    "condition_of_validity": "The signature-plus-hash guardrail is valid — that is, it actually bounds behavior — only under a conjunction of conditions that are rarely all true: 1. **Behavior is a pure function of signed bytes.** No branch selection depends on unsigned runtime input. This is almost never true for agent skills, whose entire value is conditioning on context. 2. **The capa...",
    "decision_boundary": "The decision an instance must make at load and at each invocation is not \"does the signature verify?\" (necessary, insufficient) but: **\"Is the selected dispatch branch a member of the manifest's declared branch set for this capability, under an input class the manifest authorized?\"** Concretely, the boundary is crossed — treat as injection, refuse the invoca...",
    "operational_effect": "The practical consequence is that the integrity check must be re-specified. A byte-hash of the package is a load-time gate that answers the wrong question at invocation time. The corrected architecture has three layers: 1. **Load-time:** signature over package bytes, as before — authenticates the artifact. 2. **Invocation-time:** a *dispatch attestation* — t..."
  },
  "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": "22c77329817b43dc3143552d8b6fefc5040f56aa5c8b89dbbbafb63fba3f533e",
    "verified_classes": [
      "SkillInjectionError",
      "Manifest",
      "Invocation"
    ],
    "verified_functions": [
      "attest_dispatch",
      "run_skill"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SkillInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
