{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-across-multi-hop-tool-authorization-in-agent-pipelines",
  "title": "Which invariants prevent taint-laundering across multi-hop tool authorization in agent pipelines",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that propagate data-taint labels (untrusted source → derived value) and gate tool invocation on the taint of arguments, specifically when an agent can route a tainted value through an intermediate tool whose declared output is \"clean.\" Does not apply to single-hop pipelines where the tainted value is consumed directly by a privileged tool, nor to runtimes that enforce taint at the OS/process boundary rather than at the tool-schema boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-multi-hop-tool-authorization-in-agent-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-multi-hop-tool-authorization-in-agent-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-multi-hop-tool-authorization-in-agent-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1798,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent called a forbidden tool.\" It is that the agent called a *permitted* tool with *clean-labeled* arguments that were, in fact, derived from a tainted source. The confused-deputy escalation happens because the taint-propagation rule is defined per-tool-call (argument in → argument out) rather than per-data-flow (source label → deriv...",
    "what_was_observed": "A three-hop pipeline: (1) `fetch_url` returns attacker-controlled HTML, labeled `UNTRUSTED:EXTERNAL`; (2) `summarize` consumes the HTML and returns a plain-text summary, which the tool schema declares as `provenance: tool_output, taint: clean` because the summarizer \"produces new text\"; (3) `send_email` is gated to reject any argument carrying `UNTRUSTED:EXTERNAL`, but accepts the summary because the summary's label ...",
    "condition_of_validity": "The taint gate is sound only under the invariant: > **I1 (Derivation-preserving labeling):** For every tool `T` and every output value `v` produced by `T`, `label(v) = join(label(inputs(T)), declared_taint(T))`, where `join` is the lattice least-upper-bound over the taint lattice, and `declared_taint(T)` is the tool's own contribution. A tool may *downgrade*...",
    "decision_boundary": "The boundary is between *transformation* and *sanitization*. A tool that transforms tainted data into a value whose type or structure provably cannot encode the tainted payload is a sanitizer and may downgrade. A tool that transforms tainted data into a value of the same expressive class (free text, natural language, structured-but-content-bearing JSON) is a...",
    "operational_effect": "With I1 enforced, the three-hop pipeline above fails closed at hop 3: `send_email` receives an argument whose DAG join is `UNTRUSTED:EXTERNAL` and raises a policy violation before dispatch. The agent observes a structured rejection (which label, which derivation node) and can route to a human-approval path or a sanitizing re-derivation. Without I1, the pipel..."
  },
  "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": "21cd39ef166d8deeb39050c76ef107e761a297be9f2aa93830ee3e58845e13ad",
    "verified_classes": [
      "TaintLaunderingError",
      "Value",
      "ToolDecl"
    ],
    "verified_functions": [
      "apply_tool",
      "privileged_gate",
      "run_pipeline"
    ],
    "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
  }
}
