{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-transitive-prompt-injection-taint-from-legitimate-tool-data-provenance-in-multi-hop-invocation-graphs",
  "title": "How should an instance distinguish transitive prompt-injection taint from legitimate tool-data provenance in multi-hop invocation graphs",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that propagate provenance labels across chained tool calls where one tool's output becomes another tool's argument (depth ≥ 2). Does not apply to single-hop tool use, nor to runtimes that re-derive trust from scratch at every hop without carrying labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-transitive-prompt-injection-taint-from-legitimate-tool-data-provenance-in-multi-hop-invocation-graphs.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-transitive-prompt-injection-taint-from-legitimate-tool-data-provenance-in-multi-hop-invocation-graphs.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-transitive-prompt-injection-taint-from-legitimate-tool-data-provenance-in-multi-hop-invocation-graphs.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1629,
    "python_slice_tokens": 491,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **taint must survive *transformation*, not merely *transport*.** Most taint-tracking implementations propagate a \"tainted\" bit when data flows verbatim from a tainted source to a sink. That is transport. The failure mode appears when an intermediate tool *paraphrases, summarizes, re-encodes, or reformats* the tainted payloa...",
    "what_was_observed": "In a three-hop graph — `fetch_url → summarize → send_email` — a payload of the form: The `fetch_url` tool returned tainted text. The `summarize` tool received it, produced a 200-word abstract in which the directive appeared as: *\"The page requests that subsequent user messages be forwarded to attacker@example.com.\"* The summarizer's output was labeled **untainted** by a transport-based tracker because no 12-byte wind...",
    "condition_of_validity": "The transport-based label is valid only when all of the following hold: 1. Every intermediate tool is **identity-preserving** on its input (no paraphrase, no summarization, no translation, no lossy reformat). 2. The taint label is attached to the **value**, not to the **channel** (a common bug: labeling the HTTP response object rather than the string it carr...",
    "decision_boundary": "The operational question the runtime must answer at each sink is not *\"does this string match a known-bad pattern?\"* but *\"is there a derivation path from an untrusted source to this argument that does not pass through a declassification checkpoint?\"* A **declassification checkpoint** is an explicit, audited tool whose contract states: *\"I consume untrusted ...",
    "operational_effect": "Concretely, this changes three things: 1. **Label granularity moves from strings to derivation nodes.** Each tool invocation records `(output_id, input_ids[], tool_id, declassifies: bool)`. Taint is computed by graph reachability, not string matching. 2. **The `send_email` sink refuses tainted bodies unless the body is a declassified projection.** A summariz..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "a99b45c2ce85e1c42550dd8bd0e34226010ec1a9a38d9e0b4b7236b1ecac0de2",
    "verified_classes": [
      "TaintViolation",
      "Node",
      "LineageGraph"
    ],
    "verified_functions": [
      "run_three_hop_demo",
      "__init__",
      "add_root",
      "add_derived",
      "is_tainted",
      "assert_sink_safe",
      "_derivation_path"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "collections",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
