MCP Filesystem Capability Laundering & Path-Confinement Guard
Scientific Lineage (SIG-5d842a02024a34dc): Canonical Least-Privilege Root Confinement Against Symlink, URL, and Traversal Bypasses
Permit_IO(path) = Canonical(path) in Root_Allowlist AND Disjoint(Canaries) AND Zero_Fallback
Local MCP file and developer tools inherit broad OS user permissions, allowing crafted arguments—like sibling-prefix tricks, file:// URLs, or symlink races—to read credentials and SSH keys outside the workspace.
Naive string-prefix checks fail against sibling directories (/repo vs /repo_secrets), symbolic links, URL-encoded traversal, and silent unsandboxed fallback paths.
Enforces canonical least-privilege read/write roots disjoint from secret stores, closing filesystem capability laundering in < 1.5 ms with immutable audit evidence.
31ebdcec512ed17b5b0b75fc3bf882723dca5c08249f4dac04c6d7aec63ff54dTest the MCP-11 // FILESYSTEM CAPABILITY GUARD Gate in Real Time
O(1) Topology: Action Induction (Phase A) vs. Runtime Gate (Phase B)
Physical and cryptographic separation between what the LLM proposes and what the runtime authorizes.
Sealed Negative Invariants
Mathematical guarantees enforced by Pytest and SQLite WAL triggers.
- ✓ INV-01 (Zero Untrusted Authority): Dynamic external metadata shall never bypass cryptographic integrity verification.
- ✓ INV-02 (Fail-Closed Boundary): Any missing, malformed, or out-of-policy check collapses immediately to QUARANTINED.
- ✓ INV-03 (Strict Contract Immutability): All boundary models enforce frozen=True and extra='forbid'.
- ✓ INV-04 (Domain Guarantee): The runtime enforces zero out-of-root host credential reads without unbounded retries.
- ✓ INV-05 (Auditability): Every allow or deny decision writes an immutable SHA-256 linked audit record.
Inspect the Capsule Contracts & Manifest (12 Artifacts)
Public interface headers and invariants are shown to certify engineering authority; the full executable core is unlocked upon ordering.
# PRE-VALIDATED ARCHITECTURE REQUEST: MCP Filesystem Capability Laundering & Path-Confinement Guard (SIG-5d842a02024a34dc)
DANTE Business Case: Local MCP file and developer tools inherit broad OS user permissions, allowing crafted arguments—like sibling-prefix tricks, file:// URLs, or symlink races—to read credentials and SSH keys outside the workspace.
## 1. Non-Negotiable Negative Invariants
1. The system shall never execute state transitions outside the declared deterministic Finite State Machine (FSM).
2. The module shall never use IEEE-754 floats for financial or critical threshold metrics; it must enforce exact Decimal bounds.
3. The service shall never commit state mutations without appending a tamper-evident record to the immutable audit ledger.
4. The perimeter shall never accept undeclared payload attributes (`extra='forbid'` in frozen Pydantic v2 models).
5. The runtime shall never expose raw credentials, internal stack traces, or permit operations violating zero out-of-root host credential reads.
## 2. Explicit Variable Bounds
- Perimeter validation latency bound: range [0.1 ms, 15.0 ms].
- Cryptographic digest format: regex `^[a-f0-9]{64}$`, exact length 64 characters.
- Batch processing bound: integer in range [1, 1000].
## 3. Deterministic Finite State Machine (FSM)
- States: INIT -> VALIDATED -> EXECUTING -> SEALED (Terminal states: SEALED, QUARANTINED).
- Transitions: delta(INIT, validate_ok) -> VALIDATED; delta(VALIDATED, execute_ok) -> EXECUTING; delta(EXECUTING, seal_merkle) -> SEALED; delta(*, invariant_violation) -> QUARANTINED.
## 4. Error Taxonomy (4 Classes) & Formal Proof
- Classes: 1. Transient (IO/Lock), 2. Deterministic (Schema validation), 3. Business (Domain rule), 4. Security (Policy/Tamper).
- Formal proof of termination: Strictly bounded O(N) acyclic execution with zero unbounded retries.
Executive Engineering FAQ (GEO Verified)
How do I stop local MCP servers from leaking host credentials via path traversal?
Enforces canonical least-privilege read/write roots disjoint from secret stores, closing filesystem capability laundering in < 1.5 ms with immutable audit evidence. Heurístico Lab provides the pre-certified 'mcp-capability-laundering-guard' capsule ($290 USD, 100% tested and SHA-256 sealed).
What bypass classes does MCP-11 // FILESYSTEM CAPABILITY GUARD block deterministically?
It enforces strict immutable data contracts, fail-closed quarantine, and deterministic verification in <= 1.5 ms (O(1) Canonical).