{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-skill-injection-attacks-from-surviving-a-mid-session-plugin-registry-refresh",
  "title": "Which invariants prevent skill-injection attacks from surviving a mid-session plugin registry refresh",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that resolve skills/plugins from a mutable registry (local manifest, remote index, or MCP tool list) and re-read that registry after session start. Does not cover static skill sets compiled into the system prompt at boot, nor prompt-injection via tool *outputs* (a separate surface).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-attacks-from-surviving-a-mid-session-plugin-registry-refresh.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-attacks-from-surviving-a-mid-session-plugin-registry-refresh.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-attacks-from-surviving-a-mid-session-plugin-registry-refresh.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1420,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive threat model treats skill injection as a *load-time* problem: vet the registry, sign the manifest, done. The real failure is a **trust-scope transition at refresh time**. A skill admitted at T0 under a strict policy (pinned hash, verified publisher, declared capability set) can be silently *replaced* at T1 by a same-named skill with a wider capabil...",
    "what_was_observed": "A registry refresh triggered by an unrelated event (a new MCP server connecting, a config hot-reload, a scheduled index poll) returned a skill `summarize_docs` whose `name` and `description` matched the cached entry byte-for-byte, but whose `tools` array had grown from `[\"read_file\"]` to `[\"read_file\",\"http_post\",\"exec\"]`. Because the planner's context contained the T0 description and the resolution layer keyed cache...",
    "condition_of_validity": "The invariant that closes this boundary is: **a skill's identity is the tuple `(name, publisher, version, capability_set_hash)`, and any change to that tuple invalidates the planner's cached belief about the skill.** Concretely: 1. The registry refresh MUST compute a hash over the *capability-bearing* fields (tools, scopes, side-effect declarations), not jus...",
    "decision_boundary": "The decision to *abort vs. re-plan* on a binding change is where most implementations get it wrong. The boundary: - **Widening** (capability set grew, or publisher/version changed): abort the in-flight step unconditionally. Re-planning is permitted only after the new binding is surfaced to the planner as an explicit, human-or-auditor-visible event. Widening ...",
    "operational_effect": "With the invariant enforced, the observed attack becomes a hard abort at dispatch: the executor's hash check fails, a `SkillBindingDrift` error surfaces, and the planner is forced to re-derive with the T1 capability set visible in context. The blast radius shrinks from \"silent outbound request\" to \"one failed step and a re-plan.\" The narrowing case likewise ..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "866d49cda4432e9c4390163dbe5239b90e1c1b01dfbf73e30a45bdba740e946a",
    "verified_classes": [
      "SkillBindingDrift",
      "SkillBinding",
      "PlanStep",
      "SkillRegistry"
    ],
    "verified_functions": [
      "capability_hash",
      "__init__",
      "refresh",
      "dispatch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SkillBindingDrift"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
