Repository navigation
Releases
Releases · benjaminfrombe/universal-opencode-sandbox
v0.5.4
Rename the escape tool's permission action from unsandboxed to shell_escalated, matching the tool name since 0.5.0. One vocabulary now covers both the tool and its approval prompts:
- Permission rules in opencode config now use
{ "action": "shell_escalated", ... }to pre-approve or deny escapes - The config keys
unsandboxed(deny|ask|allow) andunsandboxed_allowkeep their names - The 0.4.x tool alias
shell_unsandboxedkeeps working
v0.5.3
Includes PR #2 (improve error handling on Windows):
- Annotate executor failures with a sandbox-specific stderr message while preserving the real exit code, on both POSIX shells and Windows PowerShell
- Delay removal of the request file for background commands so the executor can read it before cleanup
v0.5.2
Fix Windows ProcessContainer launches:
- Drop denied paths whose parent directory does not exist (ProcessContainer aborted every launch with ERROR_PATH_NOT_FOUND / 0x80070003)
- Route Windows command lines through cmd.exe /d /s /c so shell builtins (echo, dir, ...) resolve
Verified end to end on a Windows 11 ARM64 VM: sandboxed commands now run inside the ProcessContainer; fail-closed behavior for network deny is unchanged.
v0.5.1
Hardening release from a full code review. No config changes are required.
Security fixes
- Real home directory under Bun.
os.userInfo().homedirfollowsHOMEon Bun, so on hosts that pointHOMEat the workspace the config and the default denied paths (~/.ssh,~/.aws, ...) resolved inside the workspace. The home directory now comes from the password database. - Request files moved out of the temp dir. They lived in a sandbox-writable directory, so a sandboxed command could delete or rewrite them. They now live in the state directory, and the config and state directories are read-only in every request.
- Admin lock covers unset fields. Fields the admin config leaves out are pinned to their strict defaults, and a malformed admin file locks instead of unlocking.
- Tightening the config never loosens a session.
unsandboxed: "deny",mode,sandbox_user_commandsand the ask guard are read from the live policy on every call. - Wildcard pre-approvals no longer match chained commands. A pattern like
git push *does not approvegit push x; other-commandany more; such commands fall back to the prompt. - File tools cannot touch the sandbox's own config and state.
- Setup never throws, so a host cannot end up running without the plugin because of a startup error.
Other fixes
- Escape tool: works on Windows (
cmd.exe), kills the whole process group on timeout and no longer hangs when child processes hold the pipes. - Read-only mode uses the symlink-resolved workspace path.
- User-command request files are removed on unload, and stale ones are swept at startup.
Verification
73 tests pass on macOS, including the real Seatbelt executor tests. The Linux and Windows code paths are covered by unit tests only and were not run on those platforms.