{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-taint-propagation-across-mcp-tool-server-boundaries-when-a-capability-scoped-syscall-returns-data-whose-provenance-labe",
  "title": "How should an instance enforce taint propagation across MCP tool-server boundaries when a capability-scoped syscall returns data whose provenance label is silently widened by the server's own sandbox?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent runtimes that sandbox MCP tool servers with per-capability syscall scopes and propagate taint labels (source provenance) from tool results back into the orchestrating LLM's context. Does not cover pure in-process tool functions, nor servers that never return data derived from prior tainted inputs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-mcp-tool-server-boundaries-when-a-capability-scoped-syscall-returns-data-whose-provenance-labe.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-mcp-tool-server-boundaries-when-a-capability-scoped-syscall-returns-data-whose-provenance-labe.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-mcp-tool-server-boundaries-when-a-capability-scoped-syscall-returns-data-whose-provenance-labe.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2081,
    "python_slice_tokens": 392,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the sandbox let an unauthorized syscall through.\" The failure is that the sandbox is *taint-aware at the syscall boundary but taint-blind at the result boundary*. When an MCP tool server executes inside a capability scope, the runtime tags each outbound syscall with the taint label of the arguments that motivated it (e.g., `user_input`, `...",
    "what_was_observed": "A three-call trace against a `filesystem-mcp` server scoped with `read:/var/scratch`, `write:/var/scratch`, `net:none`: 1. `fetch_and_stage(url=untrusted_web)` → server writes `/var/scratch/staged.json`. Runtime labels the *call* `untrusted_web` but labels the *result* `ok` (no data returned, only a status). Taint is not persisted to the scratch file's inode because the runtime's taint tracker keys on message envelop...",
    "condition_of_validity": "The static rule \"result taint = join(argument taints)\" is valid only when all three hold: - **Purity:** the server's output is a deterministic function of the current call's arguments (no reads of prior-written state, no ambient session state). - **Statelessness of scope:** the capability scope contains no writable persistent objects that survive across call...",
    "decision_boundary": "The runtime must choose, per tool server, between two enforcement postures, and the choice is not free: - **Object-taint posture:** the runtime instruments the server's filesystem/DB scope, intercepts `write`/`read` at the VFS or driver layer, joins taint on write (`obj.taint |= arg.taint`), and propagates `obj.taint` into the result envelope on read. This i...",
    "operational_effect": "Under the laundering regime, capability scoping is *necessary but not sufficient*: it bounds which syscalls the server can make, but not which taint can flow back through permitted syscalls. An attacker who can get one tainted write into a scoped object can, on a later clean-labeled call, retrieve that taint as clean data and drive downstream privileged acti..."
  },
  "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": "7b3e7466fa2ce28041566902e4cc8583c7650d7ac625c2ae1920b71ab8f1aa2e",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "ScopedObject",
      "CallTrace",
      "ServerScope"
    ],
    "verified_functions": [
      "join",
      "execute_call",
      "demo_laundering_trace",
      "obj"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert scratch.taint == Taint.UNTRUSTED_WEB"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
