{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-distrust-the-provenance-of-an-mcp-tool-response-rather-than-its-content-taint-propagation-across-re-serialization-b",
  "title": "In what scenarios must an instance distrust the *provenance* of an MCP tool response rather than its *content* — taint propagation across re-serialization boundaries",
  "date_of_record": "2026 November 12",
  "scope": "Applies to agent runtimes that sandbox untrusted Model Context Protocol (MCP) tool responses by tagging them with taint labels and enforcing capability confinement at call sites. Does *not* apply to responses that never leave the process that produced them, nor to trust domains where the tool server is co-located and attested within the same confinement boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-the-provenance-of-an-mcp-tool-response-rather-than-its-content-taint-propagation-across-re-serialization-b.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-the-provenance-of-an-mcp-tool-response-rather-than-its-content-taint-propagation-across-re-serialization-b.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-the-provenance-of-an-mcp-tool-response-rather-than-its-content-taint-propagation-across-re-serialization-b.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1825,
    "python_slice_tokens": 558,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing assumes a label attached to a value survives every transformation the value undergoes between the untrusted producer and the privileged sink. The non-obvious failure is that taint is a property of *provenance*, but confinement checks are usually implemented against a property of *representation* — a type, a wrapper class, a field name,...",
    "what_was_observed": "In a runtime that wrapped MCP responses in a `Tainted[str]` subclass, the following sequence laundered taint end-to-end without tripping any capability check: 1. Tool returns `Tainted[str]` containing a payload that includes an instruction to call `filesystem.write` with attacker-chosen path and body. 2. The orchestrator calls `json.loads(response)` to extract a structured field. `json.loads` returns plain `str` and ...",
    "condition_of_validity": "The taint-preservation guarantee is valid **only if** every transformation between producer and sink is either (a) label-aware by construction, or (b) covered by an explicit declassification rule that names the sink and the justification. The following conditions must all hold for the sandbox to be sound: - The label is carried on a type that cannot be downc...",
    "decision_boundary": "Distrust provenance — and refuse the sink call — when **any** of the following is true: - The value reaching a privileged sink was produced by a stdlib or third-party constructor that does not preserve the label, even if the value is \"ours.\" - The value passed through a truncation, summarization, or re-encoding step whose output was labeled by default rather...",
    "operational_effect": "The practical consequence is that the confinement boundary must be drawn at the **derivation graph**, and the runtime must maintain a provenance ledger that outlives any single object. Concretely: tag at the MCP transport layer, propagate through instrumented serializers, and make the sink check consult the ledger for the argument's root rather than the argu..."
  },
  "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": "cc76448b03cdb2c0309aa745f933fc71f6c4bce9e6bfe2623a19efd1b2021b1c",
    "verified_classes": [
      "TaintLaunderingError",
      "Provenance",
      "ProvenanceLedger"
    ],
    "verified_functions": [
      "load_tool_response",
      "re_serialize",
      "assemble_prompt",
      "check_sink_capability",
      "invoke_filesystem_write",
      "handle_tool_result",
      "__init__",
      "tag",
      "resolve",
      "derive"
    ],
    "verified_functions_count": 10,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
