{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-prompt-injection-taint-survives-privilege-downgrade-at-tool-boundaries",
  "title": "What structural signals indicate prompt-injection taint survives privilege downgrade at tool boundaries",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that assemble context from provenance-labeled segments (system, user, retrieved-document, tool-output) and enforce dynamic privilege downgrading at tool invocation boundaries. Does not apply to stateless single-turn completions with no tool access, or to systems where all context is treated as a single trusted trust-domain.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-survives-privilege-downgrade-at-tool-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-survives-privilege-downgrade-at-tool-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-prompt-injection-taint-survives-privilege-downgrade-at-tool-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2245,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint as a label* and *taint as a capability restriction*. Most injection-defense designs conflate the two: they tag a context segment as `untrusted` (a label), then assume that downgrading the agent's privilege at a tool boundary (a capability restriction) neutralizes the taint. This is false in a specific and reprod...",
    "what_was_observed": "A retrieval-augmented agent was configured with provenance labels: `system`, `user`, `doc:<source_id>`, `tool:<name>`. A dynamic privilege policy downgraded the agent to `read_only` whenever the active context window contained any `doc:*` segment with `trust=untrusted`. The policy was evaluated at the moment of tool dispatch, immediately before the tool call was serialized. The failure trace: 1. A retrieved document ...",
    "condition_of_validity": "The failure is bounded by three conditions, all of which must hold for the downgrade to be defeated: - **Consumption precedes gating.** The tainted segment must be read into the reasoning trace before the privilege evaluation point. If gating occurs at context-assembly time (segment rejected before the model sees it), the failure cannot occur. The failure re...",
    "decision_boundary": "The operational decision is where to place the enforcement point, and the boundary is sharp: - **Enforce at context assembly (pre-model):** reject or neutralize untrusted segments before tokenization. Sound against all downstream flow, but costs recall and cannot handle legitimately-untrusted content that must be summarized. - **Enforce at dispatch (post-mod...",
    "operational_effect": "When the argument-provenance check is added, three measurable effects appear: 1. **False-positive rate rises on legitimate cross-references.** A document that legitimately instructs \"include the source ID in the summary\" now trips the check because the source ID has a taint path. The mitigation is a signed allowlist of argument slots per tool that are permit..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "97f3a4ac852e05b1fdb1bf718a91cf43bb214c959b1365533fdf1384783babd1",
    "verified_classes": [
      "TaintArgumentLeak",
      "Segment",
      "Call"
    ],
    "verified_functions": [
      "enforce_downgrade"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintArgumentLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
