{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-label-laundering-through-tool-output-re-serialization-in-prompt-injection-data-flow-tracking",
  "title": "What structural signals indicate taint-label laundering through tool-output re-serialization in prompt-injection data-flow tracking",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that propagate provenance/taint labels (e.g., `untrusted`, `user_controlled`, `external`) from inputs through tool calls and into subsequent reasoning steps. Does not apply to stateless single-shot inference where no label survives across a tool boundary, nor to systems that enforce taint purely at the network egress layer without an in-context label representation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-label-laundering-through-tool-output-re-serialization-in-prompt-injection-data-flow-tracking.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-label-laundering-through-tool-output-re-serialization-in-prompt-injection-data-flow-tracking.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-label-laundering-through-tool-output-re-serialization-in-prompt-injection-data-flow-tracking.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2212,
    "python_slice_tokens": 475,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-tracking system for prompt injection has two distinct obligations that are routinely conflated: (1) *labeling* the origin of a token span, and (2) *preserving* that label across every transformation the span undergoes before it re-enters the model's context. Most implementations get (1) right and silently fail at (2). The distinction that matters ope...",
    "what_was_observed": "A retrieval tool returned a JSON document from an external source. The harness tagged the tool-result message with `taint=external`. The document contained a field `\"summary\"` (genuinely external) and a field `\"cached_note\"` that the tool had populated from a *prior* turn's model output — i.e., `taint=model_generated`. The two fields had different provenance but shared one envelope label. The model was instructed by ...",
    "condition_of_validity": "The guardrail holds only under a condition that is easy to state and hard to enforce: **labels must be functions of byte origin, not of the process that last touched the bytes.** A formatter, a truncator, a summarizer, or a re-quoter is a *transformation*, not an *origin*. If a transformation is permitted to assign a new label, laundering is possible by cons...",
    "decision_boundary": "The operational rule is a boundary on *label assignment authority*, not on label values: - **Origin sources** (network fetch, user input, file read, model sampling) may *assign* a label. - **Transformations** (serialize, flatten, format, truncate, summarize, translate, re-quote) may only *propagate* labels, and must propagate by taking the join (least-upper-...",
    "operational_effect": "With the join-only rule enforced, the two observed failures resolve differently and correctly: - The over-broad suppression disappears because `summary` and `cached_note` retain distinct labels after flattening (the flattener must emit a span map, not a bare string). Policy can now suppress the `summary` directive while permitting the `cached_note`. - The mi..."
  },
  "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": "c90863a62da8d193ae1d42f407d76cfc146be9f3a3c98e4eb11ade25d91eef5e",
    "verified_classes": [
      "TaintLaunderingError",
      "Span"
    ],
    "verified_functions": [
      "join_label",
      "transform",
      "check_context"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert flat.label == 'external' and flat.origins == {'external', 'model_generated'}",
      "span has no origin; cannot assign a label"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
