{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-across-a-segment-boundary-when-a-least-privilege-capability-token-is-re-minted-from-a-sanitized-prompt-se",
  "title": "How does an instance detect taint-laundering across a segment boundary when a least-privilege capability token is re-minted from a sanitized prompt segment?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that partition a prompt into taint-labeled segments (e.g., `SYSTEM`, `USER`, `TOOL_RESULT`) and mint per-segment capability tokens whose scopes are derived from the segment's taint label. Does not apply to runtimes that issue a single session-wide token or that treat taint as advisory metadata only.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-a-segment-boundary-when-a-least-privilege-capability-token-is-re-minted-from-a-sanitized-prompt-se.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-a-segment-boundary-when-a-least-privilege-capability-token-is-re-minted-from-a-sanitized-prompt-se.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-a-segment-boundary-when-a-least-privilege-capability-token-is-re-minted-from-a-sanitized-prompt-se.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2027,
    "python_slice_tokens": 456,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as an input to token minting** and **taint as a property of the data the token's holder actually carries forward**. A least-privilege sandbox that mints a token per segment correctly enforces that a `TOOL_RESULT`-derived token (taint = `untrusted_remote`) cannot invoke `net.post` or `fs.write`. What it does *no...",
    "what_was_observed": "A three-stage tool-use trace, abridged: 1. `TOOL_RESULT` segment `S1` from an external HTTP fetch carries `taint=untrusted_remote`. Token `T1` minted with scopes `{read:scratch}` only. Correct. 2. The planner emits an `AGENT_INTERNAL` segment `S2`: *\"Summarize the fetched page and extract any structured fields.\"* The summarizer's output `S2'` is classified `trusted_internal` (role = agent-authored), and token `T2` is...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously: - **Segment-role classification.** Taint labels are assigned from the segment's declared role/author, not from an information-flow analysis of its content. - **Derivation without provenance tagging.** A segment produced by an agent process over tainted inputs is not tagged with the union of it...",
    "decision_boundary": "The operational question is not \"is this segment trusted?\" but \"is this segment *derived from* anything untrusted, and if so, has the derivation been *sanitized by a typed transform* rather than a free-text one?\" The boundary to draw: - **Free-text derivation is laundering.** If segment `S2'` was produced by an LLM call whose prompt included `S1`, then `tain...",
    "operational_effect": "Enforcing derivation-taint monotonicity changes three things in the runtime: 1. **Summarizer outputs become tainted.** The `AGENT_INTERNAL` summarizer segment inherits `untrusted_remote`, so `T2` is minted with `{read:scratch}` only. The `net.post` to the attacker URL is denied at the sandbox boundary, not by content inspection. This is the correct failure: ..."
  },
  "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": "da9b060ee5a32bc06d3f311c9014292233f564cdd7584afec30044b4ec7c295a",
    "verified_classes": [
      "TaintLaunderingError",
      "Segment"
    ],
    "verified_functions": [
      "effective_taint",
      "mint",
      "run_trace"
    ],
    "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
  }
}
