Skip to content

Commit b4e7371

Browse files
Copilotyiwang
andcommitted
Fix sandbox documentation inconsistencies
- Update README to list all denied directories (was missing ~/.kube, ~/.npmrc, ~/.pypirc, ~/.netrc) - Add comprehensive [sandbox] configuration section to config.example.toml - All claims verified to match implementation Co-authored-by: yiwang <142937+yiwang@users.noreply.github.com>
1 parent 6cf361d commit b4e7371

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Every shell command the agent runs is executed inside an OS-level sandbox:
174174
| **macOS** | Seatbelt (SBPL) | Filesystem allow-listing, network denial |
175175
| **All** | rlimits | 120s timeout, 1MB output cap, 50MB file size, 64 process limit |
176176

177-
The sandbox denies access to sensitive directories (`~/.ssh`, `~/.aws`, `~/.gnupg`, `~/.docker`) and blocks all network syscalls by default. Configure extra paths as needed:
177+
The sandbox denies access to sensitive directories including `~/.ssh`, `~/.aws`, `~/.gnupg`, `~/.docker`, `~/.kube`, and credential files (`~/.npmrc`, `~/.pypirc`, `~/.netrc`). It blocks all network syscalls by default. Configure extra paths as needed:
178178

179179
```toml
180180
[sandbox]

config.example.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,43 @@ bind = "127.0.0.1"
201201
# enabled = true
202202
# api_token = "${TELEGRAM_BOT_TOKEN}"
203203

204+
# Sandbox configuration for shell command isolation
205+
# Every tool-executed shell command runs in a kernel-enforced sandbox
206+
[sandbox]
207+
# Enable sandbox (default: true)
208+
enabled = true
209+
210+
# Sandbox enforcement level (default: "auto")
211+
# Options:
212+
# - "auto" — Use highest available level for your platform
213+
# - "full" — Landlock V4+ + seccomp + userns (Linux only)
214+
# - "standard" — Landlock V1+ + seccomp (Linux) or Seatbelt (macOS)
215+
# - "minimal" — seccomp network blocking only (Linux)
216+
# - "none" — rlimits only, no filesystem or network isolation
217+
level = "auto"
218+
219+
# Command timeout (default: 120 seconds)
220+
timeout_secs = 120
221+
222+
# Maximum stdout+stderr bytes (default: 1MB = 1048576)
223+
max_output_bytes = 1048576
224+
225+
# Maximum file size via RLIMIT_FSIZE (default: 50MB = 52428800)
226+
max_file_size_bytes = 52428800
227+
228+
# Maximum child processes via RLIMIT_NPROC (default: 64)
229+
max_processes = 64
230+
231+
# Network policy (default: "deny")
232+
# Options: "deny" (block all network) or "proxy" (future: allow via socket)
233+
[sandbox.network]
234+
policy = "deny"
235+
236+
# Additional filesystem access beyond workspace and system directories
237+
# [sandbox.allow_paths]
238+
# read = ["/opt/data", "/mnt/shared"]
239+
# write = ["/tmp/scratch"]
240+
204241
[security]
205242
# LocalGPT injects a security block at the end of every LLM context window.
206243
# The block has two independent layers:

0 commit comments

Comments
 (0)