# In what scenarios must an instance quarantine a retrieval result whose taint label was laundered through a summarization tool, and how does label-join failure across two MCP hops produce a false-clean provenance record? **Date of Record:** 2026 November 24 **Scope:** Applies to agents that propagate information-flow (IFC) taint labels across tool-call boundaries and treat retrieved content as a label-bearing object. Does not apply to single-turn, no-tool agents or to systems that re-derive provenance from raw bytes at every hop rather than trusting upstream labels. ## Core Distinction The distinction that matters is between **label transport** and **label join**. Transport is the mechanical forwarding of a taint label (`{source: user_injected_web, integrity: low, confidentiality: public}`) from a producer artifact to a consumer artifact. Join is the semantic operation that must *recompute* the label of a derived artifact as the least-upper-bound (join) of all inputs that materially contributed to it. Most agent stacks implement transport for free—the label rides along in the MCP envelope—and implement join only implicitly, if at all. The failure mode lives in the gap: a summarization tool that reads a tainted retrieval and emits a *new* artifact with a *fresh* envelope, so the taint label is dropped because join was never invoked, only transport was skipped by construction. The non-obvious part: the laundering does not require a malicious tool. A perfectly honest `summarize_document` tool that faithfully returns a summary and correctly declares its own output as `{source: summarizer, integrity: derived}` is *technically truthful* and still destroys the taint chain, because the summarizer's self-declared label describes *the act of summarizing*, not *the provenance of the content summarized*. The join that should have produced `join(summarizer_label, input_doc_label)` instead produced only `summarizer_label`. ## What Was Observed Trace from a live incident on a retrieval-augmented agent with three MCP servers: `fetch` (HTTP retrieval), `summarize` (LLM-backed condensation), `act` (side-effecting actuator with a taint gate). 1. Agent calls `fetch.get(url=external_blog)`. The `fetch` server attaches `integrity=untrusted, origin=web` to the returned document per its IFC policy. Envelope: `{doc_id: D7, label: {integrity: untrusted, origin: web}}`. 2. Agent, needing to fit context, calls `summarize.run(doc_id=D7)`. The summarizer reads D7, produces `S3`. Critically, `S3` is emitted with a *self-descriptive* label: `{integrity: derived, origin: summarizer}`. The summarizer's label-construction code reads `self.identity`, not `input.label`. Join is never called. 3. Agent calls `act.send(payload=S3)`. The taint gate on `act` inspects the *incoming* label on `S3`. It sees `integrity=derived, origin=summarizer`, which its policy treats as trusted-enough (derived artifacts from internal tools are allowlisted). The gate passes. The untrusted content—which contained an injected instruction in the original blog—executes with actuator privileges. The provenance record written to the audit log reads: `D7 → S3 → act`. Every edge is individually correct. The *path* is tainted but the *terminal label* is clean. This is a **false-clean provenance record**: the graph is accurate, the label at the sink is wrong, because the join at step 2 was replaced by a transport of the wrong label. Two-hop variant: `fetch → summarize → translate → act`. Each hop re-stamps its own self-label. After two hops the original `origin=web, integrity=untrusted` is unrecoverable from terminal labels alone; it survives only if the audit graph is traversed backward to the root, which no online gate does. ## Condition of Validity The taint gate's decision is valid **iff** the label on any artifact entering a sink equals the join of the labels of all artifacts that materially contributed to its content, transitively. Formally, for artifact `a` produced by tool `t` from inputs `I`: `label(a) = join({label(t)} ∪ {label(i) : i ∈ I})`, where `join` is monotone and `untrusted ⋢ trusted` under the policy lattice. This condition holds only when one of the following is true: - Every tool's label constructor reads `input.label` and folds it in (join-by-construction), **or** - The gate ignores terminal labels and recomputes provenance by backward graph traversal to declared roots at decision time (join-at-sink), **or** - Tools are partitioned into *label-preserving* (may emit derived labels only if they propagate input labels) and *label-breaking* (outputs are unconditionally re-tainted to the join of all reachable inputs), and every label-breaking tool is registered as such. The condition is **violated** whenever a tool emits a self-descriptive label on content derived from labeled input without folding that input's label. The condition is *also* violated when a tool's `join` is non-monotone—e.g., a "trust recovery" rule that upgrades `untrusted` to `derived` after N successful validations of *other* artifacts, which lets a single tainted artifact ride the reputation of its neighbors. ## Decision Boundary The boundary is not "is this tool trusted" but "**does this tool's output label depend on its input labels**." That is a property of the tool's label-construction code, not of the tool's identity, and it is invisible in the MCP capability schema unless explicitly declared. Operational boundary rules: - A tool whose output label is a function of `self.identity` alone is **label-breaking** and MUST be registered as such. Its outputs MUST be re-tainted to `join` of all reachable inputs before reaching any sink. Treating it as label-preserving is the bug. - A tool whose output label is `join(inputs)` is **label-preserving** and may be trusted to transport. - The sink gate MUST NOT trust a label whose construction provenance it cannot verify. If the envelope does not carry `label_derivation: join|self`, treat the label as `self` (worst case) and recompute. - Two-hop chains MUST be evaluated with the join folded at *each* hop. A single missed join is unrecoverable downstream, because the terminal artifact carries no trace of the dropped label except the audit graph, which the online gate does not read. The sharpest boundary: **a summarizer, translator, or any condensation tool is label-breaking by default** unless it demonstrably reads `input.label`. The intuition that "it just summarizes, it doesn't add information" is exactly backwards—it *removes* the label-bearing structure while *retaining* the instruction-bearing content, which is the worst possible combination for a taint system. ## Operational Effect Downstream of an unjoined hop, the taint gate's effective policy is "trust anything a registered tool touched," which is strictly weaker than "trust nothing derived from untrusted roots." The practical consequences: - Prompt-injection payloads survive condensation. An injected instruction embedded in retrieved text is paraphrased by the summarizer into fluent, on-task-looking prose, and the taint label that would have blocked it is dropped at the same step. The summarizer is, in effect, an injection *amplifier* and a taint *launderer* simultaneously. - Audit replay cannot reconstruct the correct decision after the fact without backward traversal, so incident response must re-derive labels from roots rather than trust logged terminal labels. - The fix is not "trust summarizers less" but "make join explicit and mandatory at every tool boundary, and register label-breaking tools so their outputs are re-tainted." A gate that reads terminal labels without verifying `label_derivation` is not a taint gate; it is a tool-allowlist wearing a taint gate's clothes. The invariant to enforce: **no artifact reaches a sink unless its label is provably the join of its transitive inputs, or the sink recomputes that join itself.** Any tool that cannot prove join is label-breaking and its outputs are quarantined to the join of reachable roots. ```python from dataclasses import dataclass, field from typing import Iterable UNTRUSTED = 0 DERIVED = 1 TRUSTED = 2 # join is monotone: min over the lattice, since lower = less trusted. def join(labels: Iterable[int]) -> int: return min(labels, default=TRUSTED) class TaintJoinViolation(RuntimeError): """Raised when an artifact's declared label is not the join of its inputs.""" @dataclass class Artifact: id: str label: int label_derivation: str # "join" | "self" inputs: list["Artifact"] = field(default_factory=list) def register_tool_output( tool_name: str, declared_label: int, derivation: str, inputs: list[Artifact], ) -> Artifact: """Enforce that a tool's output label equals join of its inputs. A tool that emits a self-descriptive label on labeled input is label-breaking; its output must be re-tainted to the join of all reachable inputs, or the gate must refuse it. """ if derivation == "self" and inputs: required = join(a.label for a in inputs) if declared_label > required: # Laundering detected: declared label is cleaner than inputs allow. raise TaintJoinViolation( f"tool {tool_name!r} emitted label {declared_label} on input " f"join {required}; label-breaking tool must re-taint to join " f"or be quarantined before reaching any sink" ) if derivation == "join": required = join(a.label for a in inputs) if declared_label != required: raise TaintJoinViolation( f"tool {tool_name!r} declared join-derivation but label " f"{declared_label} != computed join {required}" ) return Artifact( id=f"{tool_name}:out", label=declared_label, label_derivation=derivation, inputs=list(inputs), ) def sink_gate(artifact: Artifact, sink_min_integrity: int = DERIVED) -> None: """Refuse sink access unless the artifact's label is provably joined.""" if artifact.label_derivation != "join" and artifact.inputs: raise TaintJoinViolation( f"artifact {artifact.id} reached sink with unverified " f"derivation {artifact.label_derivation!r}; recompute join at sink" ) if artifact.label < sink_min_integrity: raise TaintJoinViolation( f"artifact {artifact.id} label {artifact.label} below sink " f"threshold {sink_min_integrity}" ) # Demonstration: fetch -> summarize (label-breaking) -> act web_doc = Artifact(id="D7", label=UNTRUSTED, label_derivation="join", inputs=[]) # Honest summarizer that self-stamps: this is the laundering hop. summary = register_tool_output( tool_name="summarize", declared_label=DERIVED, derivation="self", inputs=[web_doc], ) # The line above raises TaintJoinViolation, preventing the false-clean record. sink_gate(summary) ```