@remnux/mcp-server 0.1.44 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,6 +122,16 @@ docker run -d --name remnux remnux/remnux-distro:noble
122
122
  claude mcp add remnux -- npx @remnux/mcp-server --mode=docker --container=remnux
123
123
  ```
124
124
 
125
+ To confine `upload_from_host` to a host-side sample directory (so a prompt-injected client cannot read other files off your workstation), add `--sandbox --ingest-root`:
126
+
127
+ ```bash
128
+ mkdir -p "$HOME/remnux-samples"
129
+ claude mcp add remnux -- npx @remnux/mcp-server --mode=docker --container=remnux \
130
+ --sandbox --ingest-root="$HOME/remnux-samples"
131
+ ```
132
+
133
+ See [Security Model](#security-model) for the reasoning. This is optional hardening. Without it, `upload_from_host` can read any file your user account can read.
134
+
125
135
  **With a VM (SSH):**
126
136
 
127
137
  ```bash
@@ -230,6 +240,7 @@ claude mcp add remnux --transport http http://REMNUX_IP:3000/mcp \
230
240
  | `--output-dir` | Output directory path inside REMnux | `/home/remnux/files/output` |
231
241
  | `--timeout` | Default command timeout in seconds | `300` |
232
242
  | `--sandbox` | Enable path sandboxing (restrict files to samples/output dirs) | off |
243
+ | `--ingest-root` | With `--sandbox`, confine `upload_from_host` source reads to this directory (required in docker/ssh mode) | samples dir |
233
244
  | `--transport` | Transport mode: `stdio` or `http` | `stdio` |
234
245
  | `--http-port` | HTTP server port (for http transport) | `3000` |
235
246
  | `--http-host` | HTTP bind address (for http transport) | `127.0.0.1` |
@@ -317,8 +328,11 @@ All three connection modes (docker, ssh, local) execute commands inside a dispos
317
328
  | Resource exhaustion (tools hang or consume excessive resources) | AI assistant / analysis session | Timeout enforcement (default 5 min), output budgets (40KB/tool default, 120KB total) |
318
329
  | Archive zip-slip (path traversal in archives) | Analysis session | Post-extraction validation rejects path escape attempts |
319
330
  | SSH injection | SSH connection | Proper shell escaping using single quotes |
331
+ | Host-side file read via `upload_from_host` (docker/ssh mode) | Analyst's workstation (outside isolation) | Opt-in `--sandbox` confines the source to `--ingest-root` (realpath-resolved). See the disclosure below. |
332
+
333
+ **Where `upload_from_host` reads from, and why it matters.** The relevant boundary is **connector mode (`local` vs `docker`/`ssh`), not transport**. In `local` mode (including HTTP transport with the local connector), the AI already has shell-level read on the REMnux box by design: `run_tool` executes arbitrary commands there, so `upload_from_host` reading a file outside the samples directory adds nothing beyond what the model already grants. In `docker`/`ssh` mode, `upload_from_host` is the one tool that reads from the machine where the server runs, the analyst's workstation, via `docker cp` or SFTP. That read happens outside the container/VM isolation that bounds everything else, so a prompt-injected client could stage a host file such as `~/.ssh/id_rsa` or `~/.aws/credentials` into REMnux. Enable `--sandbox` with `--ingest-root=<host staging dir>` to confine that read. In docker/ssh mode, `--ingest-root` is required when `--sandbox` is set, because the samples directory lives inside REMnux rather than on the host.
320
334
 
321
- **Other considerations:** A theoretical TOCTOU race exists between path validation and tool execution; container isolation is the primary mitigation (use immutable sample storage for high-security contexts). Tool description poisoning is mitigated by using build-time constants rather than runtime lookups from external sources.
335
+ **Other considerations:** A theoretical TOCTOU race exists between path validation and tool execution; container isolation is the primary mitigation (use immutable sample storage for high-security contexts). The `upload_from_host` confinement closes its own check-vs-read race by reading the realpath it validated. Tool description poisoning is mitigated by using build-time constants rather than runtime lookups from external sources.
322
336
 
323
337
  **What does NOT need protection (container/VM's job):** REMnux filesystem, packages, services, privileges, network config, devices, mounts, and path traversal inside REMnux — all disposable and container-isolated.
324
338