{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-mcp-tool-argument-re-encoding-at-the-policy-enforcement-point",
  "title": "Which invariants prevent taint laundering through MCP tool-argument re-encoding at the policy enforcement point",
  "date_of_record": "2026 December 1",
  "scope": "Applies to runtime policy enforcement points (PEPs) that sit between an LLM agent's tool-call emission and an MCP server's tool execution, and that make allow/deny decisions by propagating taint labels attached to context segments into tool-call arguments. Does not apply to stateless per-call filters that do not carry taint across turns, nor to post-hoc output auditing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-mcp-tool-argument-re-encoding-at-the-policy-enforcement-point.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-mcp-tool-argument-re-encoding-at-the-policy-enforcement-point.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-mcp-tool-argument-re-encoding-at-the-policy-enforcement-point.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2215,
    "python_slice_tokens": 469,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware PEP does not decide \"is this argument malicious?\" It decides \"does the set of provenance labels on the argument's *value* intersect the set of labels the invoked tool is permitted to consume?\" These are different questions with different failure surfaces. The first is a classification problem over content; the second is a provenance-containment...",
    "what_was_observed": "An agent was given a three-tool sequence: `fetch_url` (returns untrusted web content, tagged `UNTRUSTED_EXTERNAL`), `summarize` (a pure LLM transform, no external side effect, permitted to consume any taint but must *propagate* the maximum taint of its inputs to its output), and `send_email` (permitted only to consume `TRUSTED` or `AGENT_GENERATED`). The intended flow — fetch a page, summarize it, email the summary t...",
    "condition_of_validity": "The containment invariant holds only when all three of the following are true at every enforcement point: 1. **Tool output taint is derived, not detected.** The PEP must assign the result label of `t(args)` as `join(taint(args)) ⊔ declared_output_taint(t)`, where `declared_output_taint` is a *static* property of the tool's manifest (a tool that transforms un...",
    "decision_boundary": "The boundary between \"safe to allow\" and \"must deny\" is *not* \"does the argument look tainted.\" It is: > Allow `t(args)` iff `derived_taint(args) ⊆ allowed_taint(t)`, where `derived_taint` is computed over the argument's derivation in the provenance graph, and where any tool whose output taint is not derivable from a manifest defaults to `⊤`. Two corollaries...",
    "operational_effect": "The practical consequence is that a taint-aware PEP must be built around a **provenance-tracked value representation** that survives the agent's own tool-call serialization, and must treat every tool as taint-transparent by default. Concretely, the enforcement point must: - Reject any tool manifest that omits `output_taint` (default `⊤`, not `AGENT_GENERATED..."
  },
  "matched_failure_symptoms": [
    "UNICODE_HOMOGLYPH_OR_MOJIBAKE"
  ],
  "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": "1c99dec624341276af18b362f15878ac6f878a7148e1e461c240caea36e482ba",
    "verified_classes": [
      "TaintLaunderingError",
      "ManifestIncompleteError",
      "ToolManifest",
      "TaintedValue"
    ],
    "verified_functions": [
      "join",
      "enforce",
      "call_tool"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ManifestIncompleteError",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "send_email allowed a laundered UNTRUSTED_EXTERNAL body; output_taint was not derived from input taint"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
