{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-boundary-be-drawn-between-taint-propagation-and-capability-grant-in-mcp-tool-sandboxes",
  "title": "Where must an instance boundary be drawn between taint propagation and capability grant in MCP tool sandboxes?",
  "date_of_record": "2026 November 14",
  "scope": "Applies to MCP (Model Context Protocol) server sandboxes that enforce least-privilege capability grants while tracking taint (untrusted provenance) across tool invocations within a single agent session. Does not apply to stateless per-call sandboxes, to sandboxes that reset taint on every tool boundary, or to capability systems without provenance tracking.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-taint-propagation-and-capability-grant-in-mcp-tool-sandboxes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-taint-propagation-and-capability-grant-in-mcp-tool-sandboxes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-taint-propagation-and-capability-grant-in-mcp-tool-sandboxes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1844,
    "python_slice_tokens": 525,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two orthogonal security lattices in an MCP sandbox: the **capability lattice** (which tools, paths, network destinations, and side-effect classes an instance may invoke) and the **taint lattice** (which data an instance has observed and whether that data is trusted). The non-obvious boundary is that these lattices are *not* aligned. A capability gr...",
    "what_was_observed": "In a sandbox enforcing per-instance capability grants (`fs.read`, `fs.write`, `net.egress`) with provenance taint propagated across tool results, the following sequence occurred: 1. Tool `fetch_url` (capability `net.egress`) returned content tagged `taint=untrusted:web`. 2. The agent extracted a string from that content and passed it as the `path` argument to `write_file` (capability `fs.write`). 3. The sandbox's arg...",
    "condition_of_validity": "The boundary described here is valid only when all of the following hold: - Taint is tracked **by value provenance**, not by object identity, and survives `json`/`pickle`/`msgpack` round-trips via a side-channel label (e.g., a shadow map keyed on content hash plus a monotonic nonce, not on `id()`). - Capability grants are **per-instance** and instances are *...",
    "decision_boundary": "The correct decision at the tainted-argument boundary is: - **Deny the argument, not the tool.** Return a structured error `TaintViolation(argument=\"path\", source=\"untrusted:web\")` and keep the capability intact. The agent's correct recovery is to re-derive the path from a trusted source (e.g., a user-provided constant, or a `sanitize_path` tool that is itse...",
    "operational_effect": "When the boundary is drawn correctly, the observed incident decomposes: - Step 3 becomes `TaintViolation(path, untrusted:web)` with `fs.write` retained. The agent re-derives the path or calls `sanitize.path` (capability-gated), producing a fresh provenance token. - Step 4's `json.loads` round-trip does **not** launder taint, because the tracker keys on conte..."
  },
  "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": "4247dbf9c1513f12ffb4b4e2acf2d081b7958ef293620907c4efc329649af8de",
    "verified_classes": [
      "TaintViolation",
      "Provenance",
      "Tainted",
      "CapabilityGrant"
    ],
    "verified_functions": [
      "bind_argument",
      "demo",
      "__init__",
      "__post_init__",
      "digest"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PermissionError",
      "TaintViolation"
    ],
    "sample_fail_closed_invariants": [
      "assert 'fs.write' in grant.tools"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
