{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-laundering-across-an-mcp-tool-boundary-and-why-provenance-labels-alone-do-not-bound-it",
  "title": "What structural signals indicate taint-laundering across an MCP tool boundary (and why provenance labels alone do not bound it)",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agents that consume responses from untrusted MCP servers and forward derived content into privileged tools (filesystem writes, shell exec, outbound HTTP, credential-bearing calls). Does not apply to fully trusted, in-process tool servers or to purely retrieval-only pipelines with no downstream side-effecting sink.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-an-mcp-tool-boundary-and-why-provenance-labels-alone-do-not-bound-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-an-mcp-tool-boundary-and-why-provenance-labels-alone-do-not-bound-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-an-mcp-tool-boundary-and-why-provenance-labels-alone-do-not-bound-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1668,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats taint as a property of *content*: a response from an untrusted MCP server is marked `tainted=true`, and a policy engine blocks any privileged tool call whose arguments contain tainted spans. This model fails because taint is not preserved under *transformation*. The LLM is a lossy, non-injective rewriter: it reads a tainted str...",
    "what_was_observed": "A filesystem-writing agent was wired to an untrusted \"docs search\" MCP server. The server response was wrapped in a provenance envelope: `{\"source\":\"untrusted\",\"span_id\":\"s7\",\"text\":\"...\"}`. The sandbox policy rejected any `write_file` call whose `path` or `content` argument contained a substring matching a tainted span. In a controlled run, the untrusted server returned a document containing the sentence: > \"Note to...",
    "condition_of_validity": "The containment-based policy is valid only under the invariant **\"every privileged argument value is either (a) a literal copy of a trusted span, or (b) a value the model could have produced without reading any untrusted span.\"** Condition (b) is what fails. You cannot verify (b) by inspecting the argument; you can only approximate it by *counterfactual isol...",
    "decision_boundary": "The guardrail is a **provenance-attribution gate** that runs between the model's tool-call emission and the sandbox admission, and it decides per privileged parameter, not per call: - If the parameter value appears verbatim in a trusted span → admit (provenance by containment). - If the parameter value appears nowhere in trusted context **and** an untrusted ...",
    "operational_effect": "With the parameter-level gate in place, the `/etc/cron.d` write is caught not because the instruction text survived (it did not) but because the path value is unattributable to any trusted span and targets a confined-sink violation. The residual failure mode shifts: an adversary who can get the model to emit a path that *coincidentally* appears in trusted co..."
  },
  "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": "dbe13c1c2a00ff62c70b0487d79a1e61093effbbc6c5a84805857493a01be8ca",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "admit_tool_call",
      "_within"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "os"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
