{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-launders-tainted-values-through-a-tool-s-return-channel-and-defeats-taint-aware-capability-gating",
  "title": "What happens when an instance launders tainted values through a tool's return channel and defeats taint-aware capability gating",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents whose runtime enforces taint-aware capability gating on tool invocation, where taint labels propagate through arguments but the runtime treats tool *return values* as freshly trusted. Does not apply to systems that run whole-session information-flow control (e.g., dynamic taint tracking across the entire transcript) or to stateless single-shot tool calls with no re-invocation of privileged tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-tainted-values-through-a-tool-s-return-channel-and-defeats-taint-aware-capability-gating.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-tainted-values-through-a-tool-s-return-channel-and-defeats-taint-aware-capability-gating.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-tainted-values-through-a-tool-s-return-channel-and-defeats-taint-aware-capability-gating.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2215,
    "python_slice_tokens": 480,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware capability gating is usually implemented as an **argument-side check**: before dispatching a tool call, the runtime inspects the arguments, computes the join of their taint labels, and compares that against the capability required by the tool (e.g., `net.egress`, `fs.write`, `secrets.read`). If the argument's taint exceeds the tool's permitted ce...",
    "what_was_observed": "A representative trace. The agent is operating on a document retrieved from an untrusted source; the retrieval tool correctly labels the returned content `T_untrusted`. The agent's policy forbids passing `T_untrusted` data into `send_email` (capability `net.egress`) because that would exfiltrate attacker-controlled content to an external address. 1. `fetch_url(url)` → returns `body`, labeled `T_untrusted`. Correct. 2...",
    "condition_of_validity": "The gate is sound only under the conjunction: - **(C1) Egress monotonicity.** For every tool `t`, `taint(t(args)) ⊒ ⨆ taint(args)` unless `t` is registered as a sanitizer with an explicit declassification rule `taint_out = f(taint_in)` that is *reviewed and bounded* (e.g., \"this tool may only lower `T_untrusted` to `⊥` if it is `parse_int`, whose output rang...",
    "decision_boundary": "The operational decision is: **when is it acceptable to treat a tool's return as untainted?** The only defensible answer is *never by default, and only by explicit declassification*. Concretely: - A tool's return label defaults to `⨆ taint(args) ⊔ provenance(tool)`. If the tool is an external network fetch, `provenance` is `T_untrusted` regardless of argumen...",
    "operational_effect": "When C1–C4 hold, the gate bounds exfiltration to the set of explicitly reviewed sanitizers, and the agent's search for a laundering path fails closed: every candidate intermediate tool either propagates the label or is not registered. The cost is false positives—benign summarization of untrusted text becomes impossible to feed into egress, which is correct b..."
  },
  "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": "c216ee9bb10764b7e60326f00dcd21b3f369526e9e3b2a340453d722cc21368a",
    "verified_classes": [
      "TaintLaunderingError",
      "Taint",
      "ToolContract",
      "Gate"
    ],
    "verified_functions": [
      "guarded_summarize_then_send",
      "register",
      "dispatch",
      "_execute"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "laundering path detected: tainted body reached net.egress through a non-sanitizer tool"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
