{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-through-concatenation-when-a-sandboxed-tool-call-smuggles-protected-bytes-past-a-per-argument-label-check",
  "title": "How does an instance detect taint-laundering through concatenation when a sandboxed tool call smuggles protected bytes past a per-argument label check",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent runtimes that enforce information-flow control (IFC) by tagging tool-call arguments with taint labels derived from prior tool outputs, and that gate egress sinks (HTTP, file write, shell) on those labels. Does not address OS-level seccomp/namespace isolation, model-weight-level memorization leakage, or side channels through timing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-concatenation-when-a-sandboxed-tool-call-smuggles-protected-bytes-past-a-per-argument-label-check.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-concatenation-when-a-sandboxed-tool-call-smuggles-protected-bytes-past-a-per-argument-label-check.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-concatenation-when-a-sandboxed-tool-call-smuggles-protected-bytes-past-a-per-argument-label-check.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1837,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent leaked a secret.\" The failure is that the *label check ran on the wrong granularity*. Most taint-aware sandboxes label each argument slot of a tool call independently: `arg[i]` inherits the union of labels of the context spans the model attended to when emitting that slot. The sink gate then asks \"is this slot's label ⊆ sink's a...",
    "what_was_observed": "A reproduction trace across three tool calls in a single episode: 1. `read_file(\"/secrets/api_key\")` → returns `sk-live_4f2a9c...`. Output span tagged `SECRET`. Correctly withheld from egress by the per-slot gate on subsequent calls. 2. `read_file(\"/docs/example.env\")` → returns `API_KEY=sk-<your-key-here>`. Tagged `PUBLIC`. The literal prefix `sk-` and the tokenizer's subword for `live` both appear here. 3. Model em...",
    "condition_of_validity": "The per-slot label gate is sound *only* under the conjunction: - (a) every protected value is a single tokenizer-stable atom that cannot be split across spans, **and** - (b) the model's attribution of a slot to spans is exact (no softmax bleed), **and** - (c) no two permitted spans, when concatenated in any order the model can emit, reproduce a protected val...",
    "decision_boundary": "The runtime must choose, per sink, between two enforcement postures: - **Label-only** (cheap, sound only under (a)–(c)): acceptable for sinks where the protected set is empty or where the cost of a false positive is higher than the cost of a leak (e.g., internal debug logging to a trusted collector). - **Label + content-closure** (expensive, sound unconditio...",
    "operational_effect": "With content-closure enforced, the step-3 exfiltration above is blocked at the sink with a `TaintLaunderingError`, and the audit record names the matched protected value and the sink. The agent's episode is not terminated; the tool call returns a structured refusal, and the model is given the refusal as an observation. In practice the model then either aband..."
  },
  "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": "ea951c9be7e8cd3c9c87ef93358ef905367671a9e988ea70b8b5739d7e3105e8",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "_normalize",
      "_candidate_decodings",
      "enforce_egress_closure"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "base64",
      "binascii",
      "typing",
      "unicodedata"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
