-
Notifications
You must be signed in to change notification settings - Fork 6
Add enableSandbox setting and CLI flag to wrap ScriptEnvironment commands in macOS seatbelt #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for yarn6 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
…home_dir Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
|
The Yarn global folder (path obtained from the project instance) should be accessible in read-only. The project folder (project_cwd) is allowed to be read-write. No other folder is allowed by default. |
|
@copilot The Yarn global folder (path obtained from the project instance) should be accessible in read-only. The project folder (project_cwd) is allowed to be read-write. No other folder is allowed by default. |
…er read-only Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
Updated the sandbox profile in c4195ed. The sandbox is now more restrictive:
|
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
|
@copilot you allowed some other actions. Please add a single line of documentation in the code, and describe in more details what they are for in your next post. |
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
Added inline documentation in 2332d3b. Here's what each allowed action is for:
|
|
@BugBot review |
|
@BugBot review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
|
Let's make the |
|
@copilot Let's make the |
… run Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
Done in 022e9fe. Changes made:
Users can now enable sandbox via:
|
enableSandboxsetting toschema.json(defaults to false)ScriptEnvironmentto use seatbelt on macOS when enabledproject_cwd) is allowed read-write-s,--sandboxCLI flag toyarn runcommand for opt-in sandboxingSandbox Profile
The sandbox uses a restrictive profile:
Allowed Actions (with documentation)
Usage
Sandboxing is disabled by default and can be enabled in two ways:
Via configuration (
.yarnrc.yml):Via CLI flag (for one-off execution):
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Adds an
enableSandboxsetting (default true on macOS) and wraps ScriptEnvironment commands with macOSsandbox-execusing a restrictive, escaped profile.enableSandboxboolean topackages/zpm-config/schema.json(default:crate::is_macos()), with new helperis_macos()insrc/fns.rs.enable_sandbox,project_cwd,global_folder; populate fromproject.config.settings.sandbox-execwith generated restrictive profile:project_cwd: read-write;global_folderand~/.yarn: read-only; system dirs: read-only; default deny.run_execto wrap args/program accordingly and report spawn errors with the actual invoked program.Written by Cursor Bugbot for commit 14766ef. This will update automatically on new commits. Configure here.