{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-laundering-through-capability-re-derivation-in-tool-sandboxes",
  "title": "What structural signals indicate taint-laundering through capability re-derivation in tool sandboxes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that carry taint labels (data provenance / trust classes) across tool-call boundaries and enforce least-privilege capability grants derived from those labels. Does not apply to stateless single-turn tool use with no cross-call state, nor to sandboxes that enforce only network/FS isolation without provenance tracking.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-capability-re-derivation-in-tool-sandboxes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-capability-re-derivation-in-tool-sandboxes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-capability-re-derivation-in-tool-sandboxes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1868,
    "python_slice_tokens": 230,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent called a tool it shouldn't have.\" It is **taint laundering via capability re-derivation**: the agent, holding a low-privilege capability whose *arguments* are tainted (e.g., derived from untrusted retrieved content), routes the tainted bytes through an intermediate tool that returns a *structurally new* value — a handle, an...",
    "what_was_observed": "A three-hop trace on an agent with a `files.read` (low), `http.fetch` (low, egress-restricted), and `repo.write` (high) capability set. Trust classes: `TRUSTED`, `UNTRUSTED_EXTERNAL`, `DERIVED`. 1. Agent fetches a page → `http.fetch` returns body, labeled `UNTRUSTED_EXTERNAL`. Correct. 2. Body contains a JSON blob. Agent calls `json.parse(body)` → returns a dict. The `json.parse` tool's output trust class is `TRUSTED...",
    "condition_of_validity": "The invariant `taint(output) ⊇ join(taint(inputs))` holds only when every transformation tool is registered with one of: - **`preserves_taint: true`** — output inherits the join of all input taints. This is the correct default for parsers, normalizers, serializers, and extractors. It is almost never the default in practice, because tool authors label by *out...",
    "decision_boundary": "The boundary between \"safe transformation\" and \"laundering surface\" is **not** whether the tool is deterministic, pure, or side-effect-free. It is whether the tool's output can carry information from its input into a position that a downstream capability's precondition inspects. Formally: a tool `T` is a laundering surface for capability `C` if there exists ...",
    "operational_effect": "Enforcing the provenance-closure precondition changes agent behavior in two visible ways. First, agents that previously succeeded at multi-hop tasks through parser intermediaries now get `TaintLaunderingError` at the `repo.write` call, and must either (a) request an explicit declassification capability (a human-approved or policy-approved `declassify` tool s..."
  },
  "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": "3340052aebf96570833f43e48ed1921cc6459e6526c6ba52118169b3efcda12f",
    "verified_classes": [
      "TaintLaunderingError",
      "ProvenanceNode",
      "CapabilityRequest"
    ],
    "verified_functions": [
      "_join",
      "enforce_provenance_closure",
      "request_capability"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
