-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[SECURITY] No read-only root filesystem — writable /sandbox increases attack surface #804
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingpriority: highImportant issue that should be resolved in the next releaseImportant issue that should be resolved in the next releasesecuritySomething isn't secureSomething isn't secure
Description
Problem Statement
The NemoClaw sandbox has a fully writable /sandbox and /tmp directory. While OpenShell Landlock policies restrict access to specific paths, the writable nature of the sandbox filesystem means:
- Agents can create files anywhere within
/sandbox - Agents can modify their own runtime environment
- Persistent malware can survive within the writable filesystem
Impact
A compromised agent can:
- Write scripts and execute them later
- Modify runtime libraries or configuration within writable paths
- Create hidden files that persist across agent invocations
- Use writable space for data staging before exfiltration
Proposed Design
Support a read-only root filesystem mode with explicit writable overlays:
# docker-compose.yml
services:
sandbox:
read_only: true
tmpfs:
- /tmp:size=100M
volumes:
- sandbox-work:/sandbox/workspace:rw # only workspace is writableThis limits the writable surface to explicitly declared directories. Combined with Landlock policies, this provides defense-in-depth.
References
- CIS Docker Benchmark 5.12: "Mount container's root filesystem as read only"
- Kubernetes Security Best Practices: readOnlyRootFilesystem
Alternatives Considered
No response
Category
enhancement: feature
Checklist
- I searched existing issues and this is not a duplicate
- This is a design proposal, not a "please build this" request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority: highImportant issue that should be resolved in the next releaseImportant issue that should be resolved in the next releasesecuritySomething isn't secureSomething isn't secure