{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-even-when-the-tool-itself-is-trusted",
  "title": "Under what conditions must an instance treat a tool result as tainted even when the tool itself is trusted",
  "date_of_record": "2026 November 8",
  "scope": "Applies to any agent runtime that propagates dynamic information-flow labels (taint) across tool-call boundaries, where a \"trusted tool\" may still return data whose *provenance* is attacker-controlled. Does not apply to static label systems where all data from a tool is unconditionally classified by the tool's trust level alone.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-even-when-the-tool-itself-is-trusted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-even-when-the-tool-itself-is-trusted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-even-when-the-tool-itself-is-trusted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1483,
    "python_slice_tokens": 337,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is this: **tool trust is a property of the code that executes, not of the data that flows through it.** A retrieval tool, a web-fetch tool, a database query tool, or a file-read tool can be perfectly trusted (correct implementation, no injection in its own logic) while still returning bytes whose *content* was authored by an adversar...",
    "what_was_observed": "In a deployment doing dynamic IFT across a chain `user → planner → fetch → summarize → exec_shell`, the planner invoked `fetch` on a URL supplied in a prior tool result (a search snippet). The `fetch` tool was on the trusted allowlist. The labeler assigned the fetch result `LOW` because the tool was trusted. The summarize step preserved `LOW`. The `exec_shell` sink accepted `LOW` input. An instruction embedded in the...",
    "condition_of_validity": "The invariant \"trusted tool ⇒ untainted output\" is valid **only if** all of the following hold: 1. The tool's output is a pure function of its *explicit* arguments, and those arguments are themselves untainted. 2. No ambient state (cache, environment, filesystem, prior session memory, model weights updated from prior calls) influences the output. 3. The tool...",
    "decision_boundary": "At each tool-call boundary, compute: where `provenance_label_of_payload` is the label attached to the *origin* of the returned content (e.g., the URL's registrable domain class, the DB row's source table's label, the file's owner class). The sink check is then `result_label ⊑ sink_permitted_label`. Two operational rules follow: - **Never downgrade across a b...",
    "operational_effect": "When this invariant is enforced, prompt-injection payloads arriving via trusted retrieval tools remain labeled `TAINTED` through summarization and cannot reach `exec`, `write`, or outbound-network sinks without triggering a declassification audit. The cost is a small number of false positives (legitimately fetched content blocked at a sink) which are resolve..."
  },
  "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": "0b543696737579bd2defd9927cb07f8b7e689fea299f7820346a3aeb6fce01dd",
    "verified_classes": [
      "TaintLaunderingError",
      "Label",
      "ToolResult",
      "ToolBoundary"
    ],
    "verified_functions": [
      "enforce_sink",
      "join",
      "call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
