{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-launders-injected-taint-through-a-tool-that-returns-a-derived-value-rather-than-the-tainted-bytes",
  "title": "What happens when an instance launders injected taint through a tool that returns a *derived* value rather than the tainted bytes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents using dynamic information-flow labels (taint tracking) where labels propagate across tool call boundaries via data-dependency analysis. Does not apply to static allowlist/denylist prompt filtering, nor to systems that treat every tool result as uniformly untrusted regardless of provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-injected-taint-through-a-tool-that-returns-a-derived-value-rather-than-the-tainted-bytes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-injected-taint-through-a-tool-that-returns-a-derived-value-rather-than-the-tainted-bytes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-injected-taint-through-a-tool-that-returns-a-derived-value-rather-than-the-tainted-bytes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1603,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking designs for prompt injection assume the taint label travels *with the bytes*. When a tool returns text containing a fragment of a tainted source, the label rides along because the substring is present and attributable. The failure mode examined here is orthogonal: a tool consumes tainted input and returns a **derived, non-substring value*...",
    "what_was_observed": "An agent was processing an untrusted email body (label `TAINT{untrusted_content}`) and called a `string_contains(text, needle)` helper to check whether the body mentioned a specific account number. The helper returned `True`. The taint-tracking layer, implemented as substring attribution over tool outputs, found no tainted span inside the literal output `\"True\"` and therefore emitted a clean result. The agent's plann...",
    "condition_of_validity": "The guardrail holds only under a **dependency-closure labeling rule**: for every tool invocation, the output label must be the join (least upper bound) of the labels of *all arguments actually read by the tool's implementation*, regardless of whether their bytes appear in the output. This requires the tool boundary to declare, per tool, its **read-set** and ...",
    "decision_boundary": "The boundary between a safe and unsafe configuration is the tool registry's default classification and the planner's treatment of control-flow dependence. - **Unsafe:** tools default to \"transparent\"; propagation computed post-hoc by string search over outputs; control-flow branches on clean-looking derived values without taint checks. - **Safe:** every tool...",
    "operational_effect": "With dependency-closure labeling, the laundered boolean from the trace above carries `TAINT{untrusted}`, and the planner's `if contains: proceed` branch is flagged as control-flow-tainted. Policy then requires either human confirmation, a re-derivation of the predicate from a trusted source, or refusal. The injection is contained at the point of *decision*, ..."
  },
  "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": "a2530beaf7ecf9b18606c5c3aefb2b81644024d6ebc695538c3b497ff5ef0365",
    "verified_classes": [
      "TaintLaunderingError",
      "ToolClass",
      "Label",
      "ToolSpec"
    ],
    "verified_functions": [
      "label_tool_output",
      "guard_control_flow",
      "join"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
