Skip to content

fix(sandbox): keep agent workspace off gateway state files - #79

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/high-severity-issues-82df
Draft

fix(sandbox): keep agent workspace off gateway state files#79
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/high-severity-issues-82df

Conversation

@cursor

@cursor cursor Bot commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Default workspace_path was ~/.shellclaw, the same directory as gateway pairing tokens, memory.db, and config.toml. With default workspace_only=1, inbound Discord / WebChat / cron file tools treated those files as in-bounds.

Bug

Root cause

workspace_only is a prefix check against workspace_path. The default path was the process state dir, so the security control that is on by default authorized tool access to pairing tokens.

Fix

  • Default workspace_path to ~/.shellclaw/workspace and create that directory at tool init.
  • Deny auth_tokens.json, shellclaw.pid, shellclaw.log, and .shellclaw/config.toml / .shellclaw/memory.db even if they sit inside a custom workspace.
  • Block those token names in the shell allowlist and unsandboxed fallback list.

Validation

  • CI=true GATEWAY=1 make test (full suite, including new file/allowlist/config/shell cases)
Open in WebView Automation

Default workspace_path was ~/.shellclaw, the same tree as pairing
tokens, memory.db, and config.toml. With workspace_only on, inbound
Discord/webchat/cron file tools could read or overwrite those files.
Point the default at ~/.shellclaw/workspace and deny runtime state
paths even when an operator keeps the old workspace root.

Co-authored-by: esadrianno <esadrianno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant