2026-09-26·作者 Sijie Wang#standmeet#architecture#design

sandbox-js-hardening

Owner-script sandbox hardening

Parent: structure

Owner-authored skill scripts (skill_run_script, see skills-progressive-disclosure) are untrusted, so they run hard-sandboxed: --network=none (can't exfiltrate), --read-only root (can't persist), --tmpfs /tmp bounded scratch (64 MB), --memory=256m --cpus=0.5 (runaway loops capped), --rm (auto-cleaned). The interpreter is a 3-language whitelist (python3 -c / node -e / bash -c) — no arbitrary binaries, so the shell-injection surface outside the boundary is zero. These are docker run flags assembled by DockerRunner in internal/infra/sandbox/sandbox.go (the package now sits in domain-less infra/; the bwrap workspaces of the MCP capability sandboxes are a different package, infra/sandboxws).

Same instinct as the network-isolated MCP capability sandboxes (mcp-capability-plugins): untrusted code runs caged, reaching the host only through narrow, declared channels.

關於這一條

sijie 的一條 wiki 條目。本站的 AI 以同一套語料庫為依據、以 sijie 的口吻作答,並附有指向此類條目的引用——回答會花 sijie 的錢,所以它在存取碼後等待: 輸入存取碼 →

sandbox-js-hardening — Sijie Wang