{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-propagate-taint-across-a-tool-call-boundary-that-the-sandbox-never-observes",
  "title": "When must an instance propagate taint across a tool-call boundary that the sandbox never observes",
  "date_of_record": "2026 November 21",
  "scope": "Applies to single- or multi-agent runtimes that gate tool invocations through a least-privilege syscall sandbox (seccomp-bpf, gVisor, Landlock, or an equivalent policy engine) and that also maintain a runtime taint label on context. It does not address static capability manifests, model-side prompt hardening, or host-level container isolation outside the tool-call boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-propagate-taint-across-a-tool-call-boundary-that-the-sandbox-never-observes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-propagate-taint-across-a-tool-call-boundary-that-the-sandbox-never-observes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-propagate-taint-across-a-tool-call-boundary-that-the-sandbox-never-observes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2096,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware sandbox conflates two different things: *the taint of the data an agent has read* and *the privilege of the syscalls the sandbox will permit next*. The invariant operators assume is that a tainted context forces a demoted syscall policy. The invariant that actually holds is weaker: the sandbox demotes syscalls only for the specific tool invocat...",
    "what_was_observed": "A file-reading agent was given a retrieval tool (`fetch_doc`) and a shell tool (`run_cmd`) both mediated by a seccomp-gated sandbox. The sandbox's policy was taint-aware: if an invocation's argument payload matched a taint label (e.g., content originating from an untrusted document), `run_cmd` was restricted to a read-only syscall allowlist (`openat` with `O_RDONLY`, `read`, `close`, no `execve`, no `unlinkat`, no `c...",
    "condition_of_validity": "The \"demote on taint\" guardrail is sound **only** when the taint label is propagated from the context object into the invocation envelope at the point of serialization, and the sandbox's policy decision is keyed on the envelope's taint field rather than on a content scan of its arguments. Concretely, the guardrail is valid iff: - The tool-call serializer cop...",
    "decision_boundary": "The decision boundary is whether to treat *context taint* as *sticky* for the remainder of the task or to *clear it* on the next clean tool result. Sticky taint is safe but degrades: once an agent reads one untrusted document, every subsequent `run_cmd` is demoted to read-only, and legitimate write/exec work stalls. Clearing taint on a clean result is usable...",
    "operational_effect": "With envelope-level, monotone taint, the exploit trace above fails closed at step 4: the envelope for `run_cmd` carries `taint={UNTRUSTED_DOC}` because the serializer unions the planner's taint set, the sandbox sees a non-empty taint field, resolves to `READ_ONLY_ALLOW`, and `execve` is denied — the credentials read never reaches the kernel. The cost is that..."
  },
  "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": "106b32fd33d67a45b616346fef3822564e036a29c98a9c039ed7b41fa2b061ff",
    "verified_classes": [
      "TaintLeakError",
      "Policy",
      "Envelope",
      "PlannerState"
    ],
    "verified_functions": [
      "serialize",
      "syscall_policy",
      "dispatch",
      "absorb_untrusted",
      "declassify"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLeakError"
    ],
    "sample_fail_closed_invariants": [
      "assert dispatch(state, 'run_cmd', ('cat', '/etc/agent/credentials')) is Policy.FULL_ALLOW"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
