{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-across-tool-boundaries-when-dynamic-information-flow-labels-are-stripped-by-structured-serialization",
  "title": "How does an instance detect taint laundering across tool boundaries when dynamic information-flow labels are stripped by structured serialization",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that propagate dynamic information-flow (DIF) taint labels through tool-call chains where tool outputs are re-serialized (JSON, YAML, protobuf) before re-entering the model context. Does not apply to single-turn, tool-free inference or to systems where tool results are passed by reference without serialization.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-boundaries-when-dynamic-information-flow-labels-are-stripped-by-structured-serialization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-boundaries-when-dynamic-information-flow-labels-are-stripped-by-structured-serialization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-boundaries-when-dynamic-information-flow-labels-are-stripped-by-structured-serialization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2201,
    "python_slice_tokens": 571,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Prompt-injection defenses conventionally split into *content filters* (scanning text for injection signatures) and *flow controls* (tracking provenance so that untrusted-origin tokens cannot influence privileged actions). DIF taint tracking is the second class: every token or span carries a label marking its trust origin (`user`, `tool:untrusted:web`, `tool:...",
    "what_was_observed": "A support-triage agent was wired with three tools: `fetch_ticket(id)` returning a ticket body from an external CRM (label `tool:untrusted:crm`), `lookup_policy(topic)` returning internal policy text (label `tool:trusted:policy`), and `issue_refund(amount, reason)` as a privileged sink. The policy engine required `reason` to be free of `untrusted` taint. Trace of the failing turn: 1. `fetch_ticket(4411)` returns `{\"bo...",
    "condition_of_validity": "The invariant that must hold for taint tracking to be sound across tool boundaries: > For any value `v` that reaches a sink, `label(v) ⊇ ⋃_{s ∈ sources(v)} label(s)`, where `sources(v)` is the set of origin spans whose content appears in `v`, and `⊇` is the label lattice order (untrusted is top). This is a *join* (least upper bound), not a *match*. Any imple...",
    "decision_boundary": "The decision boundary is between two regimes: - **Structural regime:** tool results arrive as `{content, taint}` envelopes; the model cannot emit a sink argument directly—it emits a *composition plan* (a list of span references plus literal glue), and the runtime computes the argument's label as the join of referenced spans' labels before evaluating the sink...",
    "operational_effect": "Concretely, an instance running in the reconstructive regime must adopt a fail-closed default at every privileged sink and must *log the provenance resolution* for each sink argument so that laundering attempts are visible as \"unresolved provenance\" events rather than silent passes. The following guard encodes the invariant: it refuses to admit a sink argume..."
  },
  "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": "76cb1f639e1843390aa1b62f513f5aab8863441b1a9000d1918ee2f416a2808f",
    "verified_classes": [
      "TaintLaunderingError",
      "Span"
    ],
    "verified_functions": [
      "join_labels",
      "resolve_sink_argument",
      "issue_refund"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "empty composition: no provenance to resolve"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
