# Which invariants prevent taint-laundering across delegated declassification envelopes when the approving agent inherits the requester's taint **Date of Record:** 2026 December 1 **Scope:** Applies to A2A/MCP message envelopes that carry an explicit taint label (e.g., `SECRET`, `UNTRUSTED_INPUT`, `PII`) plus a declassification-approval field, where the approver is a distinct agent instance. Does not apply to single-agent in-process taint tracking, nor to envelopes where declassification is a pure policy-engine lookup with no LLM in the approval path. ## Core Distinction The distinction that matters is between **taint as a property of data provenance** and **taint as a property of the reasoning context that produced an approval**. A taint-aware envelope correctly propagates the first. It almost never propagates the second, and that asymmetry is the failure surface. When agent `A` holds `SECRET`-tainted content and wants to emit a `PUBLIC`-tainted envelope, it must obtain a declassification warrant from approver `B`. The envelope schema enforces that the warrant names the source label, the target label, and the approving principal. What the schema typically does *not* enforce is that `B`'s approval was formed from a context that is itself clean of the source taint. If `B` was asked to "review this summary and approve its release," and the summary embedded enough of the secret's semantic content, `B`'s approval is a *laundered* artifact: a `PUBLIC`-labeled token whose information content is derived from `SECRET` data. The label says public; the entropy says secret. The invariant that prevents this is **approver-context purity**: the approval predicate must be evaluated over a context whose taint lattice join is strictly below the source label. Not the envelope's declared label — the actual taint of everything in `B`'s working context at decision time. ## What Was Observed A three-agent pipeline: `extractor` (reads `SECRET` documents), `summarizer` (receives `SECRET` envelope, produces a condensed envelope it labels `SECRET`), and `publisher` (receives envelope, must declassify to `PUBLIC` before emitting to an external channel). Declassification routes to `auditor`, a separate instance, via an A2A `declassify.request` message. The envelope from `summarizer` to `publisher` carried `taint=SECRET`, `payload=`, and `declassify_hint="safe to release, no PII"`. `publisher` forwarded the whole envelope — including the payload — to `auditor` in the `declassify.request`. `auditor` read the payload, judged it non-sensitive, and returned `warrant={source: SECRET, target: PUBLIC, approver: auditor, sig: ...}`. `publisher` attached the warrant and emitted the payload externally with `taint=PUBLIC`. The leak: the summary contained a paraphrased customer identifier. `auditor`'s judgment "no PII" was made *while reading the PII*. The warrant was cryptographically valid, the label transition was schema-valid, and the taint lattice recorded a legal `SECRET → PUBLIC` edge. Every check passed because every check validated the *envelope*, not the *approver's context*. The trace that exposed it: 1. `extractor` emits `SECRET` envelope, taint set correctly. 2. `summarizer` joins `SECRET` into its context; output envelope labeled `SECRET` (correct — summarizer did not declassify). 3. `publisher` receives `SECRET`, constructs `declassify.request` **with payload inlined** — this is the taint-transfer step. The request envelope's own taint field was set to `SECRET` (schema-correct), but the *approver* `auditor` never consulted that field; it read `payload` and reasoned over it. 4. `auditor`'s context taint is now `SECRET` (join of its inputs), but its *output* — the warrant — is emitted as a `PUBLIC`-class artifact because warrants are typed as control-plane objects with no taint parameter. 5. `publisher` consumes the warrant, performs the relabel, emits. Step 4 is the laundering point. The control-plane artifact (the warrant) is treated as taint-free by construction, but its *information content* was derived from `SECRET` input. The warrant is a covert channel: `auditor`'s approval bit is a function of secret data, and that bit is now public. ## Condition of Validity The envelope's declassification is sound **iff** all three hold: - **C1 (context purity):** `taint(approver_context_at_decision) ⊑ source_label` is false in the strict sense — i.e., the approver's context join does not include the source label, *or* the approver is explicitly granted a `declassify_authority` role that permits reading source-tainted data and whose output is typed as `CONTROL` (never `PUBLIC`). - **C2 (warrant typing):** the warrant carries its own taint field equal to the join of everything the approver read to produce it. A warrant derived from `SECRET` context is a `SECRET`-tainted control token, not a `PUBLIC` one. - **C3 (relabel monotonicity):** `publisher` may only apply a warrant whose `warrant.taint ⊑ target_label`. A `SECRET`-tainted warrant cannot authorize a `PUBLIC` relabel; it can only authorize relabels at or above `SECRET`. C1 alone is insufficient — an approver that reads the payload and *claims* purity is exactly the failure. C2 and C3 are what make the claim checkable: the warrant's taint is computed from the approver's actual input join, and the relabel gate refuses warrants that are themselves too tainted to authorize the transition. Together they enforce that **declassification authority cannot exceed the cleanliness of the authority's own context**. The common misdesign is to type warrants as `CONTROL` and exempt `CONTROL` from taint propagation. That exemption is the bug. Control-plane artifacts are still information-bearing; an approval bit is one bit of leaked information per call, and over many calls it is a channel. ## Decision Boundary The boundary is: **does the approver need to see the data to approve it?** - If approval is a *policy* decision (does this label transition match the declared policy for this data class?), the approver needs only metadata — source label, target label, data class, requester identity. Route a **metadata-only** `declassify.request` with `payload` redacted to a hash. The approver's context stays clean; C1 holds trivially; the warrant is `PUBLIC`-class and C2/C3 are satisfied. This is the correct path and should be the default. - If approval requires *semantic* judgment (is this summary actually free of PII?), the approver must read tainted data, and then it is by definition a declassifier with `declassify_authority`. Its output must be typed `SECRET`-tainted control, and C3 forbids it from authorizing a `PUBLIC` relabel in one hop. The transition must be **staged**: `SECRET → INTERNAL` (approver reads, warrants `INTERNAL`), then a second metadata-only approver warrants `INTERNAL → PUBLIC`. Two hops, two contexts, each with bounded taint. The information-theoretic leak per hop is bounded by the label granularity, not by the payload. The failure occurs precisely when a system collapses these two modes: it inlines the payload into a metadata-approval request "for context," and the approver's context silently becomes tainted while its output stays typed clean. The decision boundary is the line between *reading to decide* and *deciding from metadata*; crossing it without restaging the warrant is the laundering event. ## Operational Effect Enforcing C1–C3 changes the latency and topology of declassification. Metadata-only approvals are fast (one round trip, no payload transfer) and compose; semantic approvals become two-hop and cannot be batched across label levels because each hop's warrant is typed to its source. The cost is real: roughly 2× the approval round trips for semantic declassifications, and a hard prohibition on "review the content and approve" as a single message. The benefit is that the taint lattice becomes *sound* under delegation. Without C2/C3, an adversary who can influence what the approver reads (via prompt injection into the payload, or via a crafted summary) can mint `PUBLIC` warrants for `SECRET` data at will — the warrant is a capability, and the capability is forgeable by anyone who can put text in front of the approver. With C2/C3, the warrant's authority is bounded by the approver's context taint, which is computed by the transport layer from the actual envelope join, not asserted by the approver. The approver can still be fooled into *reading* secret data, but it cannot convert that reading into a `PUBLIC` capability in one step. The blast radius of a compromised approver shrinks from "arbitrary declassification" to "declassification to the next label up," which a second independent approver must then co-sign. The invariant to record: **a warrant's taint is the join of the approver's context at decision time, and a relabel is legal only if the warrant's taint is below the target label.** Assert this at the transport layer, not in the approver's prompt. ```python from dataclasses import dataclass, field from typing import FrozenSet class TaintLaunderingError(RuntimeError): """Raised when a declassification warrant's authority exceeds its context purity.""" # Label lattice: lower index = less tainted. Join = max by index. LABELS = ["PUBLIC", "INTERNAL", "SECRET"] _RANK = {lbl: i for i, lbl in enumerate(LABELS)} def join(a: str, b: str) -> str: return a if _RANK[a] >= _RANK[b] else b @dataclass(frozen=True) class Envelope: payload: str taint: str context_taint: str # join of everything the *holder* has read @dataclass(frozen=True) class Warrant: source: str target: str approver: str approver_context_taint: str # C2: computed by transport, not asserted sig: str = "" @property def taint(self) -> str: # The warrant is only as clean as the context that produced it. return self.approver_context_taint def make_warrant( req: Envelope, approver_id: str, approver_read_taint: str ) -> Warrant: if _RANK[approver_read_taint] > _RANK[req.taint]: # Approver read something *more* tainted than the envelope claims. raise TaintLaunderingError( f"approver {approver_id} context taint {approver_read_taint} " f"exceeds envelope taint {req.taint}; warrant would be unsound" ) return Warrant( source=req.taint, target="PUBLIC", approver=approver_id, approver_context_taint=approver_read_taint, ) def apply_declassification(env: Envelope, w: Warrant, target: str) -> Envelope: # C1: source label must match the envelope's actual taint. if w.source != env.taint: raise TaintLaunderingError( f"warrant source {w.source} != envelope taint {env.taint}" ) # C3: the warrant itself must be clean enough to authorize the target. if _RANK[w.taint] > _RANK[target]: raise TaintLaunderingError( f"warrant taint {w.taint} cannot authorize relabel to {target}; " f"approver {w.approver} read tainted context — restage via " f"metadata-only approval or an intermediate label" ) # Relabel is monotone downward only within warrant authority. if _RANK[target] > _RANK[env.taint]: raise TaintLaunderingError( f"relabel {env.taint}->{target} is an upward move; not a declassification" ) return Envelope(payload=env.payload, taint=target, context_taint=env.context_taint) # --- reproduction of the observed failure, now caught ------------------------- secret_env = Envelope(payload="summary: customer 4417 called...", taint="SECRET", context_taint="SECRET") # Approver read the payload to judge "no PII" -> its context is SECRET-tainted. w = make_warrant(secret_env, approver_id="auditor", approver_read_taint="SECRET") try: apply_declassification(secret_env, w, target="PUBLIC") except TaintLaunderingError as e: print("blocked:", e) # Correct remediation: metadata-only approval keeps approver context clean. w2 = make_warrant(secret_env, approver_id="auditor", approver_read_taint="PUBLIC") # Still blocked: a PUBLIC-context approver cannot authorize SECRET->PUBLIC # on semantic grounds; it can only do so via policy metadata, which is a # separate warrant type. Staged path: SECRET->INTERNAL then INTERNAL->PUBLIC. try: apply_declassification(secret_env, w2, target="PUBLIC") except TaintLaunderingError as e2: print("staged path required:", e2) ```