{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-tool-call-that-passes-taint-checks-the-sink-reachability-gap-in-taint-aware-allow-deny-enforcement",
  "title": "When must an instance Refuse a Tool Call That Passes Taint Checks: The Sink-Reachability Gap in Taint-Aware Allow/Deny Enforcement",
  "date_of_record": "2026 November 11",
  "scope": "Applies to runtime policy engines that decide allow/deny for tool invocation by propagating taint labels from sources (user input, retrieved documents, model-generated arguments) to sinks (shell, filesystem, network, credential stores). Does not apply to pure static analysis, nor to systems where every tool is treated as a fully trusted sink with no argument-dependent behavior.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-call-that-passes-taint-checks-the-sink-reachability-gap-in-taint-aware-allow-deny-enforcement.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-call-that-passes-taint-checks-the-sink-reachability-gap-in-taint-aware-allow-deny-enforcement.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-call-that-passes-taint-checks-the-sink-reachability-gap-in-taint-aware-allow-deny-enforcement.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1715,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware policy engine answers two different questions, and conflates them at its peril: 1. **Label question:** \"Does the argument reaching this tool carry a taint label that this tool is not cleared to receive?\" 2. **Reachability question:** \"Given the *concrete* argument value, does invoking this tool actually place tainted data into a sink the policy...",
    "what_was_observed": "A policy engine allowed `write_file(path, content)` when `content` carried no taint label. A prior call in the same session, `fetch_url(url)`, had returned attacker-controlled bytes; those bytes were written to `/tmp/cache/response.bin` by an *approved* call whose taint was correctly scrubbed at the boundary because the destination was classified as a non-sink scratch area. A later call, `write_file(\"/etc/cron.d/sync...",
    "condition_of_validity": "The label-only decision is valid **iff** the taint model is *channel-complete*: every way tainted bytes can re-enter a later invocation is itself instrumented as a source. Concretely, this requires all of: - Every persistent store writable by an approved call (filesystem, cache, env vars, database rows, message queues) is either (a) classified as a sink, so ...",
    "decision_boundary": "The engine must refuse — or escalate to reachability evaluation — when the following predicate holds, even though all taint labels on the immediate arguments are clean: The non-obvious part is the middle clause. Engines routinely check the first and last clauses and omit the second, because \"the tool has no tainted arguments\" feels like a closed proof. It is...",
    "operational_effect": "Enforcing the reachability conjunct converts a class of silent laundering into an explicit deny or an escalation to a human/policy-oracle review. The cost is that the engine must maintain a provenance map over persistent stores — a write-set keyed by path/env/db-key, each entry carrying the taint of the flow that last wrote it, with a session-scoped or time-..."
  },
  "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": "f14814fa4ccd6cf350afa5103cf56a193b154f570d99e418479fb17aa765f0d8",
    "verified_classes": [
      "SinkReachabilityError",
      "ProvenanceMap"
    ],
    "verified_functions": [
      "enforce_invocation",
      "__init__",
      "record_write",
      "taint_of"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SinkReachabilityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
