{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-taint-tagged-agent-from-laundering-untrusted-data-through-a-trusted-tool-s-return-channel",
  "title": "Which invariants prevent a taint-tagged agent from laundering untrusted data through a trusted tool's return channel",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent runtimes that implement dynamic information-flow control (IFC) by tainting tool *arguments* and *results* and gating subsequent tool invocations on the taint lattice. Does not cover static dataflow analysis, prompt-level \"do not follow instructions in retrieved text\" mitigations, or human-review gates.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-taint-tagged-agent-from-laundering-untrusted-data-through-a-trusted-tool-s-return-channel.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-taint-tagged-agent-from-laundering-untrusted-data-through-a-trusted-tool-s-return-channel.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-taint-tagged-agent-from-laundering-untrusted-data-through-a-trusted-tool-s-return-channel.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2004,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model is that taint flows through *data*: if a value is tainted, any tool call carrying it is blocked or downgraded. The failure mode this record addresses is different and non-obvious: **taint is laundered through the return channel of a trusted tool, not through its arguments.** A tool declared as a trusted declassifier (e.g., `json.parse...",
    "what_was_observed": "A retrieval agent under a two-label lattice (`CLEAN ⊑ TAINTED`) was configured with a per-tool policy table. `http.fetch(url)` was marked `sink=TAINTED` (any returned bytes are tainted). `json.parse(s)` was marked `declassify=true`: it was allowed to consume tainted strings and its output was labeled `CLEAN`, on the assumption that structural parsing strips instruction-bearing prose. `send_email(to, body)` was marked...",
    "condition_of_validity": "The laundering path exists if and only if all three hold simultaneously: - **(C1) A tool is declared a declassifier with a constant output label.** The policy asserts `output_label = CLEAN` regardless of `input_label`. This is the load-bearing assumption. - **(C2) The tool's output is a *faithful subterm* of its input.** Parsing, regex matching, template sub...",
    "decision_boundary": "The invariant that bounds this is **declassifier soundness as a per-call obligation, not a per-tool declaration**: > A tool declared `declassify` may only emit `CLEAN` output when the specific call's output is provably independent of the tainted portion of its input. Otherwise the output label must be `join(input_label, tool_base_label)`, and the call must b...",
    "operational_effect": "Enforcing the per-call declassifier obligation eliminates the laundering path at the cost of a large increase in taint propagation — most \"parsing\" steps now taint their outputs, and agents that previously ran clean pipelines will begin tripping sink gates. This is correct behavior surfacing previously silent exfiltration channels, but it produces a predicta..."
  },
  "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": "2212550c993cc347d388f7b5feafff81e5893c458ad3981918605960ff493a54",
    "verified_classes": [
      "TaintLaunderingError",
      "Value"
    ],
    "verified_functions": [
      "join_label",
      "invoke_declassifier",
      "gate_sink",
      "run_pipeline"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
