{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-through-capability-re-derivation-in-tool-sandboxing",
  "title": "How does an instance detect taint-laundering through capability re-derivation in tool sandboxing",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that track data provenance (taint) across tool calls and attenuate capabilities based on the taint of inputs. Does not apply to stateless single-turn inference with no tool invocation, nor to runtimes that enforce isolation purely via OS-level process boundaries rather than logical taint labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-capability-re-derivation-in-tool-sandboxing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-capability-re-derivation-in-tool-sandboxing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-capability-re-derivation-in-tool-sandboxing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2097,
    "python_slice_tokens": 388,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure examined here is not \"untrusted input reached a privileged tool.\" That is the baseline case every sandbox is built to catch, and it is caught by a straightforward taint check at the call boundary. The non-obvious failure is **taint laundering via capability re-derivation**: a privileged capability that was correctly attenuated at derivation time ...",
    "what_was_observed": "A three-stage trace from a runtime that used per-call taint labels on arguments but treated tool handles as opaque, non-tainted references. 1. **Taint introduction.** A `fetch_url` tool returns content from an attacker-controlled page. The runtime correctly labels the returned string `taint=UNTRUSTED(source=web)`. The agent holds this string in context. 2. **Correct attenuation.** The agent attempts `write_file(path,...",
    "condition_of_validity": "The laundering succeeds only when three conditions co-occur: - **(a) Reconstructibility.** A capability can be re-minted from a descriptor that does not itself carry the taint history of prior attenuations. This requires the runtime to expose a manifest/introspection surface whose entries are not taint-tracked back to the capabilities they describe. - **(b) ...",
    "decision_boundary": "The boundary is between **attenuation as handle state** and **attenuation as principal-session state**. Handle-state attenuation is cheap and composable but is defeated by any path that mints a sibling handle. Session-state attenuation survives re-derivation but must answer: *when does a session's attenuation set get cleared?* The safe answer is \"only at ses...",
    "operational_effect": "Without the lineage check, the practical consequence is that **attenuation is advisory, not enforcing**, for any agent that can introspect. An agent that has been correctly denied once can retry through a fresh handle and succeed, and the success is silent. Auditing this after the fact is hard because the tainted data's label is intact — only the capability'..."
  },
  "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": "f024df6d8bb12af2622816bfa79d9d84b87454ce69fb551737f6f41db5f56686",
    "verified_classes": [
      "TaintLaunderingError",
      "Capability",
      "CapabilityLedger"
    ],
    "verified_functions": [
      "request_capability",
      "invoke",
      "__init__",
      "record_attenuation",
      "is_attenuated"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
