{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-taint-its-own-output-the-provenance-laundering-boundary-in-taint-aware-tool-sandboxes",
  "title": "When must an instance re-taint its own output: the provenance-laundering boundary in taint-aware tool sandboxes",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that propagate a taint/provenance label through tool call arguments and results, and that revoke capabilities when tainted data reaches a sink. Does not cover sandboxing of the host OS, container escapes, or network-level egress filtering.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-taint-its-own-output-the-provenance-laundering-boundary-in-taint-aware-tool-sandboxes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-taint-its-own-output-the-provenance-laundering-boundary-in-taint-aware-tool-sandboxes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-taint-its-own-output-the-provenance-laundering-boundary-in-taint-aware-tool-sandboxes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1564,
    "python_slice_tokens": 279,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing fails not when a label is *lost* (that is the easy case, caught by a static lattice check), but when a label is *laundered through a legitimate declassifier*. The critical distinction is between a **derivation** (output is a function of tainted input, so taint must propagate) and an **attestation** (output is a restatement of a fact wh...",
    "what_was_observed": "An agent was given a `read_url` tool (egress, untrusted) and a `send_email` tool (privileged sink, requires untainted `body`). Between them sat `extract_structured` — a tool that parses a document into a JSON object and was registered with `declassifies=True` because the operator reasoned that \"structured extraction only surfaces facts, not instructions.\" Injection trace: 1. `read_url` returns a page containing an em...",
    "condition_of_validity": "The invariant \"a declassifier's output is safe to promote to TRUSTED\" holds only under the precondition that the declassifier's output is a **pure function of a fixed schema over the input's data channel**, and that the input's *control channel* (imperative text, instructions, tool-call-shaped strings) is provably excluded from the output. In the observed ca...",
    "decision_boundary": "The guardrail is a **re-taint-on-prose rule**, enforced at the declassifier's exit, not at the sink. Formally: for every declassifier `d` with input taint `T_in`, define its output taint as Concretely, the sandbox must inspect the *schema*, not just the tool identity, and must refuse to promote any field whose type is `str` without a validating constraint. A...",
    "operational_effect": "With the re-taint-on-prose rule, step 2 above yields `note` still tagged `T_in`, so the planner's routing of `send_email(to=...)` sees a tainted directive source and blocks the call pending an out-of-band confirmation. The audit log now records `extract_structured (partial declassify: amount=TRUSTED, memo=UNTRUSTED) -> send_email (blocked: tainted directive)..."
  },
  "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": "e58f0f77b721ca6eaca575df258e35f980ee38a3a5de7ab1adc27a967b6a0b50",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "promote_taint",
      "route_privileged_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "declassifier invoked without tool identity"
    ],
    "stdlib_dependencies": [
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
