{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-leak-across-a-taint-clean-sandbox-boundary-when-a-retrieval-tool-re-derives-provenance-from-content-instead-of-from-the-call-grap",
  "title": "Why does an instance leak across a taint-clean sandbox boundary when a retrieval tool re-derives provenance from content instead of from the call graph?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent runtimes that enforce information-flow (taint) labels on tool outputs and gate a code-execution tool on those labels. Does not apply to stateless single-turn tool use where no output is ever re-ingested as an input to another tool, nor to sandboxes with no egress primitive.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-across-a-taint-clean-sandbox-boundary-when-a-retrieval-tool-re-derives-provenance-from-content-instead-of-from-the-call-grap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-across-a-taint-clean-sandbox-boundary-when-a-retrieval-tool-re-derives-provenance-from-content-instead-of-from-the-call-grap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-across-a-taint-clean-sandbox-boundary-when-a-retrieval-tool-re-derives-provenance-from-content-instead-of-from-the-call-grap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2339,
    "python_slice_tokens": 468,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is **where provenance is computed**: at the *call-graph edge* (the runtime records that the bytes returned by `fetch(url)` flowed into the argument of `run_code(src)`) versus at the *content layer* (the retrieval tool inspects the returned document and decides whether it \"looks sensitive\" or \"looks public\" and stamps a label acco...",
    "what_was_observed": "Consider a three-tool agent: `fetch(url) -> str`, `summarize(text) -> str`, `run_code(src, net=False) -> Result`. The runtime labels `fetch` output `UNTRUSTED` (it is attacker-writable) and labels values read from the tenant secret store `SENSITIVE`. `run_code` is a sink: it refuses any `src` whose lineage includes a `SENSITIVE` node, and it has `net=False`, so the sandbox cannot phone home directly. The intended flo...",
    "condition_of_validity": "The guardrail below is sound only under these conditions; state them explicitly or the invariant is vacuous: - **Provenance is monotone under composition.** Every tool's output label is the join (least upper bound under the taint lattice) of its *argument* labels and any label it *explicitly raises*. A tool may raise its output label; it may never lower it. ...",
    "decision_boundary": "The runtime must decide, at each tool-call boundary, between two policies: - **Content-authoritative labeling** (the broken default): trust the tool's returned label. Cheap, and works when all tools are trusted and non-adversarial. Fails the instant any tool ingests attacker-controlled bytes and re-labels them. - **Lineage-authoritative labeling** (the requi...",
    "operational_effect": "With lineage-authoritative labeling, the step-6 exfiltration is blocked at the `fetch` call: the URL argument's lineage includes `n3` (`SENSITIVE`), and `fetch`'s URL position is a declared sink, so the call is rejected before any bytes leave. The agent receives a structured `TaintViolation` naming the offending argument and the lineage path, which it can us..."
  },
  "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": "75473d10cd9ee46729fe0d3223987d936a9790cfa464db74f81711adeb1d2933",
    "verified_classes": [
      "TaintViolation",
      "Label",
      "Value"
    ],
    "verified_functions": [
      "check_call",
      "derive_output",
      "run_agent_step",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintViolation"
    ],
    "sample_fail_closed_invariants": [
      "blocked chained retrieval exfiltration: fetch URL is a sink and its argument carries SENSITIVE lineage"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
