rkfg/dsh-better-sandbox
Extra sandbox rules for DSH: writable caches outside the workspace, .git and secret paths denied, enforced at the harness seams.
Adds the two things the built-in workspace-write mode cannot express. Grants let you allow specific caches and toolchains an agent legitimately needs, such as .cache, ccache or a Go install root, without falling back to unrestricted access. Denials make .git inside every writable root unwritable and protected paths such as .ssh, .npmrc or mounted shares unreadable, and they fail closed: reads inside sandboxed commands hit a real mode-000 mount, recreated before each command if something removed it, while tools get an honest permission error plus a policy marker so the model sees a refusal instead of file contents. Enforcement spans the filesystem provider (stat, list, read variants and every write), the process sandbox (extra bubblewrap binds after the workspace bind), a ripgrep spawn wrapper for glob and grep, and an announcement block in model context listing grants and protected paths so the model knows the rules before it tries.
Install
dsh plugin --profile web add @rkfg/dsh-better-sandbox @rkfg/dsh-better-sandbox-uiTwo packages install together: the rule engine and its settings UI. Rules are live — the Settings page edits them and the running session picks them up without a restart. Grants and denials are configured rather than assumed, so an empty config changes nothing.
Compatibility
Linux with bubblewrap, which is what the process-confinement and read-mask layers rely on. It replaces the harness filesystem, process-sandbox and subprocess providers with subclasses that add rules, so it does not wrap or proxy the agent.
Details
- Repo: rkfg/dsh-better-sandbox
- Category: Infrastructure & Deployment
- Stars: 0
- Version: 0.2.1 (npm)
Alternatives
tensorlakeai/dsh-tensorlake-sandbox · NeevCloudAI/dsh-neev-sandbox · omdsh-dev/sandbox-nono