Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Built-in profiles (set via `SEATBELT_PROFILE` env var):
- `restrictive-open`: Strict restrictions, network allowed
- `restrictive-closed`: Maximum restrictions

For custom profiles, the system first looks for a file `.qwen/sandbox-macos-<profile>.sb` under your project settings directory. If not found there, it will check for the file in your user settings directory at `~/.qwen/sandbox-macos-<profile>.sb`.

### Custom Sandbox Flags

For container-based sandboxing, you can inject custom flags into the `docker` or `podman` command using the `SANDBOX_FLAGS` environment variable. This is useful for advanced configurations, such as disabling security features for specific use cases.
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/utils/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ export async function start_sandbox(
`sandbox-macos-${profile}.sb`,
);
}
// if not found, look for file under user settings directory
if (!fs.existsSync(profileFile)) {
profileFile = path.join(
USER_SETTINGS_DIR,
`sandbox-macos-${profile}.sb`,
);
}
if (!fs.existsSync(profileFile)) {
console.error(
`ERROR: missing macos seatbelt profile file '${profileFile}'`,
Expand Down