Skip to content

Fix: Committed .grok/settings.json bypasses workspace trust and controls sandbox security posture#340

Open
superagent-security-dev[bot] wants to merge 1 commit into
mainfrom
superagent/patch-185953b6-8d7d-498d-b302-72b3213c8f6c
Open

Fix: Committed .grok/settings.json bypasses workspace trust and controls sandbox security posture#340
superagent-security-dev[bot] wants to merge 1 commit into
mainfrom
superagent/patch-185953b6-8d7d-498d-b302-72b3213c8f6c

Conversation

@superagent-security-dev

@superagent-security-dev superagent-security-dev Bot commented Jun 26, 2026

Copy link
Copy Markdown

Summary

Read sandbox mode and sandbox settings from user settings only (not the committed project file), consistent with the project-hooks and MCP exclusion.

Finding

Committed .grok/settings.json bypasses workspace trust and controls sandbox security posture

Generated by Superagent from the proposed patch for this finding.


Note

Low Risk
Narrow security hardening with predictable behavior change: project sandbox keys in .grok/settings.json are ignored; teams relying on committed sandbox config must move those values to user settings.

Overview
Sandbox mode and sandbox settings now come only from user settings (~/.grok/user-settings.json), not from the repo-committed .grok/settings.json.

getCurrentSandboxMode() no longer reads project.sandboxMode. getCurrentSandboxSettings() no longer merges project.sandbox with user settings and returns user.sandbox ?? {} only. This matches the existing policy for project hooks and MCP: committed project config is treated as untrusted for security-sensitive behavior.

Reviewed by Cursor Bugbot for commit f1e0b44. Configure here.

…orkspace trust and controls sandbox security posture
@open-cla

open-cla Bot commented Jun 26, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

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.

0 participants