{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-through-a-tool-output-provenance-relabel",
  "title": "How does an instance detect taint-laundering through a tool-output provenance relabel?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that carry a per-span provenance label (`trusted:user`, `trusted:system`, `untrusted:tool_output`, etc.) and gate side-effecting tool calls on the label of the instruction that motivated them. Does not cover pure-output filtering, classifier-based injection detection, or single-turn stateless calls with no tool loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-a-tool-output-provenance-relabel.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-a-tool-output-provenance-relabel.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-a-tool-output-provenance-relabel.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2301,
    "python_slice_tokens": 429,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an injection reaches an action. The first is *direct propagation*: an untrusted span instructs the agent, the agent's planner copies that instruction into a tool call, and the label travels with the copied text because the copy is byte-identical. This is the case everyone builds for, and it is easy: taint follows the substring. The second ...",
    "what_was_observed": "Consider a research agent with three tools: `web_fetch`, `parse_html`, and `send_email`. Labels are attached per message part at ingestion. The gating rule is: `send_email` may only be invoked if the argument span's label is a subset of `{trusted:user, trusted:system}`. Turn 1 — user: \"Summarize the top result for 'quarterly vendor list' and email it to ops@corp.\" Label: `trusted:user`. Turn 2 — `web_fetch` returns a...",
    "condition_of_validity": "The exact-match propagator is only sound under a condition that is almost never stated: *the agent never transforms untrusted text between ingestion and action.* Any of the following violations break it, and all are routine: 1. **Summarization or extraction.** The model rewrites the span into a schema field (`{\"recipient\": \"archive@external.example\"}`). Fiel...",
    "decision_boundary": "An instance must treat \"no matching parent span\" as **`untrusted`, not `trusted`** — the default-stamp must be fail-closed. Concretely, the boundary is: - If a span is byte-equal to a parent, inherit that parent's label (fast path, still valid). - If a span is a *transformation* of parents (any of summarization, extraction, translation, composition), the lab...",
    "operational_effect": "With fail-closed defaulting plus destination provenance, the attack above is stopped twice: the planner's bullet is labeled `untrusted` (no attribution record → denied), and even if labeled trusted, the `send_email` call to `archive@external.example` fails the destination check because that address never appeared in a user span. The cost is real and must be ..."
  },
  "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": "0fcd6a243dd518355407773c6cd09f5f56ed4bbd990495f3ff6efd9c3ec59e42",
    "verified_classes": [
      "TaintLaunderingError",
      "Span"
    ],
    "verified_functions": [
      "join_labels",
      "label_generated_span",
      "authorize_send"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
