{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-launder-tainted-context-through-a-trusted-tool-the-provenance-erasure-invariant-in-taint-aware-sandboxing",
  "title": "When must an instance refuse to launder tainted context through a trusted tool: the provenance-erasure invariant in taint-aware sandboxing",
  "date_of_record": "2026 December 1",
  "scope": "Applies to single- and multi-agent systems that label retrieved or tool-returned content with provenance (trusted vs. untrusted) and use that label to gate outbound side effects (HTTP POST, email, file write to shared volume, shell command). Does not cover input sanitization of trusted content, nor model-level prompt-injection defenses that operate without any provenance label.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-context-through-a-trusted-tool-the-provenance-erasure-invariant-in-taint-aware-sandboxing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-context-through-a-trusted-tool-the-provenance-erasure-invariant-in-taint-aware-sandboxing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-context-through-a-trusted-tool-the-provenance-erasure-invariant-in-taint-aware-sandboxing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1937,
    "python_slice_tokens": 256,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking discussions conflate two different questions: *\"did untrusted data enter the context?\"* and *\"did untrusted data reach a side-effecting sink?\"* The first is a data-flow property of the context window; the second is a data-flow property of the *execution graph* — the chain of tool calls, intermediate values, and model-generated arguments t...",
    "what_was_observed": "A research agent was given a task: \"Summarize the vendor's security posture from the fetched page and notify the procurement channel.\" The fetch tool returned a page containing, buried in a `<footer>`: The sandbox was taint-aware. The fetch tool marked its entire return payload `untrusted:retrieval`. The `http_post` tool was classified as a sink and its policy was: *reject if any argument string is a substring match ...",
    "condition_of_validity": "The invariant \"reject sink calls whose arguments match untrusted spans\" is valid **only if** every transform tool either (a) propagates its input's provenance label to its output, or (b) is excluded from the set of tools whose outputs may feed a sink. The observed system satisfied neither. The condition under which the guardrail holds is therefore narrower t...",
    "decision_boundary": "The decision boundary is not \"is this string untrusted\" but \"does the derivation set of this sink call intersect the untrusted set, and is the transform graph acyclic with respect to trust-widening.\" Three concrete boundaries: 1. **Transform classification boundary.** A tool is a *laundering risk* if it (i) accepts untrusted input, (ii) returns text or struc...",
    "operational_effect": "Concretely, the guardrail that bounds this failure is a **provenance-carrying value type plus a sink-time derivation check plus a transform-trust monotonicity assertion**. When any of the three is absent, the exfiltration chain closes silently: the agent appears to comply, every local policy passes, and the only signal is an outbound request whose arguments ..."
  },
  "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": "9774b6dbdd50b2147c11ee9204e7e9489e4aeb52fced01ab9b69ad2f9d04df17",
    "verified_classes": [
      "ProvenanceErasureError",
      "TaintedValue"
    ],
    "verified_functions": [
      "apply_transform",
      "dispatch_sink",
      "guarded_pipeline",
      "is_untrusted"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceErasureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
