Skip to main content
NullClaw enforces security at every layer with multi-backend sandbox isolation for tool execution. Sandboxing restricts filesystem access, network access, and system resources.

Overview

NullClaw’s sandbox system:

Landlock

Native Linux kernel LSM (no dependencies)

Firejail

User-space sandboxing with profiles

Bubblewrap

Lightweight container runtime

Docker

Full container isolation

Quick Setup

config.json
NullClaw automatically selects the best available backend: Linux priority:
  1. Landlock (native kernel, fastest)
  2. Firejail (if installed)
  3. Bubblewrap (if installed)
  4. Docker (if daemon running)
  5. None (application-layer only)
macOS priority:
  1. Docker (if daemon running)
  2. None (application-layer only)
Landlock requires Linux kernel 5.13+ and is the fastest option with zero external dependencies.

Sandbox Backends

Landlock (Native Linux)

Kernel-level access control (Linux 5.13+):
config.json
Features:
  • Native kernel LSM (Linux Security Module)
  • Zero external dependencies
  • Fastest startup (<0.1ms overhead)
  • Restricts filesystem access to workspace
  • No network isolation (use with autonomy settings)
Availability:
Restrictions:
  • Read/write only within workspace directory
  • No access to /etc, /home/*, system directories
  • Symlink escape detection
  • Null byte injection prevention

Firejail

User-space sandboxing with profiles:
config.json
Installation:
Features:
  • Filesystem isolation (--private, --whitelist)
  • Network namespaces (--net=none)
  • Process isolation (--seccomp)
  • Profile-based configuration
Command wrapping:

Bubblewrap

Lightweight container runtime:
config.json
Installation:
Features:
  • Minimal container runtime
  • Namespace isolation
  • Bind mounts for workspace access
  • No daemon required
Command wrapping:

Docker

Full container isolation:
config.json
Features:
  • Complete process isolation
  • Network isolation configurable
  • Resource limits (CPU, memory, disk)
  • Read-only root filesystem
  • Custom base images
Prerequisites:
Command wrapping:

None (Application-Layer Only)

Disable OS-level sandboxing:
config.json
Only use "backend": "none" for development or trusted environments. Rely on autonomy and workspace_only settings for safety.
Application-layer security still enforced:
  • Workspace scoping (workspace_only: true)
  • Command allowlists (allowed_commands)
  • Path allowlists (allowed_paths)
  • Risk assessment (block rm -rf /, dd, etc.)

Autonomy & Resource Limits

Workspace Scoping

config.json
Levels:
  • supervised: Require approval for medium-risk actions
  • full: Auto-approve low/medium-risk (still blocks high-risk)
  • restricted: Approve even low-risk actions
workspace_only:
  • true: Block access outside ~/.nullclaw/workspace/
  • false: Allow access to allowed_paths

Command Allowlists

config.json
Wildcard:
Allows all commands (use with workspace_only: true). Blocked commands (always):
  • rm -rf /
  • dd if=/dev/zero
  • :(){ :|:& };: (fork bomb)
  • chmod -R 777 /
  • Other destructive patterns

Resource Limits

config.json
Enforced via:
  • Docker: --memory, --cpus
  • Firejail: --rlimit-* flags
  • Bubblewrap: cgroup limits
  • Landlock: Not enforced (use autonomy settings)

Audit Logging

Track all sandboxed operations:
config.json
Logged events:
  • Tool executions
  • Filesystem access
  • Network requests
  • Permission denials
  • Security policy changes
Log format:

Security Layers

NullClaw enforces defense-in-depth:
1

Gateway Pairing

6-digit one-time code required for API access.
2

Channel Allowlists

Empty allowlist denies all messages (explicit opt-in).
3

Workspace Scoping

Filesystem access restricted to workspace directory.
4

Sandbox Isolation

OS-level isolation via landlock/firejail/bubblewrap/docker.
5

Resource Limits

CPU, memory, disk, process limits enforced.
6

Audit Trail

Signed event log with configurable retention.

Configuration Profiles

Development (Relaxed)

config.json

Production (Strict)

config.json

Edge/Embedded (Minimal)

config.json

Troubleshooting

Sandbox Not Available

Permission Denied

Command Blocked

Check allowlist:
Or add specific command:

Docker Network Issues

Change network mode:

Landlock Not Detected

Verify kernel support:

Advanced Configuration

Custom Docker Image

config.json

Firejail Custom Profile

Create ~/.nullclaw/firejail.profile:
Reference in config:

Multi-Tier Sandboxing

Combine sandbox backends with tool-specific overrides:
config.json

Benchmarks

Sandbox startup overhead (measured on Linux, 0.8 GHz edge core): Binary size impact:
  • Landlock: +2 KB (compiled in)
  • Others: No size impact (external binaries)

Next Steps

Hardware Integration

Connect Arduino, Raspberry Pi, STM32

AI Providers

Configure OpenAI, Anthropic, OpenRouter