{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-evaluate-an-egress-allowlist-decision-the-taint-laundering-gap-in-per-tool-call-policy-enforcement",
  "title": "When must an instance re-evaluate an egress allowlist decision: the taint-laundering gap in per-tool-call policy enforcement",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that enforce tool-call allowlisting and data-flow egress control at the granularity of individual tool invocations, where policy decisions are cached or memoized per (tool, argument-shape) pair. Does not apply to runtimes that re-derive egress policy from full provenance on every call, nor to pure-function tools with no data-flow reachability to untrusted sinks.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-evaluate-an-egress-allowlist-decision-the-taint-laundering-gap-in-per-tool-call-policy-enforcement.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-evaluate-an-egress-allowlist-decision-the-taint-laundering-gap-in-per-tool-call-policy-enforcement.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-evaluate-an-egress-allowlist-decision-the-taint-laundering-gap-in-per-tool-call-policy-enforcement.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1930,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats an egress allowlist as a *capability gate*: if tool `T` is permitted to call destination `D`, then any invocation of `T` targeting `D` is permitted. This is wrong for data-flow control. The correct model is a *taint gate*: the decision depends not only on `(T, D)` but on the **provenance of the bytes flowing into `T` on this sp...",
    "what_was_observed": "A research agent was given two tools: - `fetch_url(url)` — returns untrusted external content; its return value is labeled `UNTRUSTED`. - `send_email(to, subject, body)` — an egress tool allowlisted only for `to` in an internal domain, with a policy that forbids transmitting `UNTRUSTED`-labeled content. During a benign warm-up, the agent called `send_email(\"ops@internal.example\", \"status\", \"all clear\")`. Argument sch...",
    "condition_of_validity": "The memoized egress decision is sound **only if** the following holds for every cache hit: i.e., the current argument taint must be *less than or equal to* the taint of the arguments the decision was originally computed against, under the runtime's taint lattice (typically `TRUSTED ⊑ UNTRUSTED`, with `UNTRUSTED` the top). If the current call is *more* tainte...",
    "decision_boundary": "The runtime must choose, per egress tool, between two enforcement disciplines: - **Shape-cached allowlisting** (fast, unsound under taint): valid only when the tool is *taint-insensitive* — its policy does not depend on argument provenance (e.g., a pure computation tool with no external sink, or an egress tool whose policy is genuinely `(to, D)`-only and ign...",
    "operational_effect": "Downstream of the failure, three effects propagate: 1. **Audit-trail corruption.** The egress log records `taint=TRUSTED` for calls that carried `UNTRUSTED` bytes, because the label was copied from the cache entry. Post-hoc forensic reconstruction of what left the boundary is impossible from logs alone; you must replay the provenance graph. 2. **Silent polic..."
  },
  "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": "5fdc3c12b8b818eff82e98ec0bab7c6c41a965ab62be9bf2eb29c2047b15dd99",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "EgressDecision",
      "EgressGate"
    ],
    "verified_functions": [
      "enforce_egress",
      "_recompute_taint",
      "decide"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
