# In what scenarios must an instance reject a taint-cleared egress request that originated from a declassified parent label **Date of Record:** 2026 November 15 **Scope:** Applies to taint-aware tool sandboxes that propagate information-flow labels (taint) through agent action graphs and enforce label-based egress restrictions at tool invocation time. Does not apply to pure capability sandboxes without label propagation, nor to static allowlist egress filters that ignore provenance. ## Core Distinction The boundary failure addressed here is the confusion between **label declassification** (a label transition on a value, authorized by policy) and **taint clearance** (the removal of an egress restriction on an action, which must be authorized per-action by the destination's policy). A sandbox that propagates taint correctly through values will still leak if it treats a declassified *value* as evidence that *actions derived from it* are egress-safe. Concretely: an agent reads a document labeled `secret:internal`, applies a policy-sanctioned transform that declassifies the derived value to `public`, and then invokes an egress tool. The naive sandbox sees the tool's argument labeled `public` and permits the call. The correct sandbox must additionally check that the *action node* — the tool invocation itself, whose provenance is the union of all labels in the agent's reasoning path, not just the argument's label — is not still tainted by the parent label. Declassification of a value does not declassify the action graph that produced it. ## What Was Observed A multi-step agent task: (1) read `customer_pii` (label `secret:pii`), (2) compute an aggregate count via an approved declassifier tool returning label `public`, (3) call `http_post` with the aggregate. The aggregate value was correctly labeled `public`. The sandbox permitted the POST. The leak: the agent's *action provenance* included the PII read, and the destination endpoint was an unapproved external host. The count itself was benign, but the same code path, with a slightly different agent plan, would have exfiltrated per-record data through a declassifier that the policy assumed would only ever produce aggregates. The sandbox had no invariant tying action-node taint to argument taint. Observed failure signature: `egress_permitted(arg_label=public, action_taint={secret:pii}, dest=untrusted)` — the check passed on the argument and never consulted `action_taint`. ## Condition of Validity The rejection rule is valid when and only when all of the following hold: 1. The sandbox maintains a per-action provenance set `A` (union of labels of all values read, tools invoked, and memory slots touched in the causal chain producing the action), distinct from the argument label set `V`. 2. At least one label `l ∈ A` is not in the destination's permitted-egress set `E(dest)`. 3. The declassification that produced `V` was authorized for *value disclosure* but its policy record does not include an `action_declassify` grant scoped to `dest`. If the declassifier policy explicitly grants `action_declassify(dest)`, the action is egress-safe and the request must be permitted. The rule is invalid if the sandbox collapses `A` into `V` at any step (the failure mode), or if `E(dest)` is unknown — in which case fail closed. ## Decision Boundary The decision is not "is the argument public?" but "is `A \ E(dest)` empty?" A taint-cleared egress request must be rejected when the action provenance carries a label the destination cannot receive, even if every argument is declassified. The rejection must name the offending label and the destination, and must not silently downgrade the action to a warning — silent downgrade is how the observed leak occurred. ## Operational Effect Enforcing the action-provenance invariant increases false-positive egress denials for legitimate aggregate-export workflows unless declassifier policies are written with explicit `action_declassify` grants. Operators must audit declassifier policy records for the missing grant before enabling the strict check, or legitimate tasks will fail closed. The compensating control is a per-destination `action_declassify` allowlist maintained alongside value-declassification policy, reviewed whenever a new egress tool is registered. ```python class TaintClearanceViolation(RuntimeError): """Raised when an egress action's provenance carries a label the destination cannot receive.""" pass def authorize_egress(action_provenance: set[str], argument_labels: set[str], destination: str, egress_policy: dict[str, set[str]]) -> None: if destination not in egress_policy: raise TaintClearanceViolation( f"unknown destination {destination!r}; failing closed" ) permitted = egress_policy[destination] offending = action_provenance - permitted if offending: raise TaintClearanceViolation( f"egress to {destination!r} rejected: action provenance carries " f"{sorted(offending)} not permitted by destination policy; " f"argument labels {sorted(argument_labels)} were declassified but " f"the action graph was not" ) return None ```