Skip to content

feat(sandbox): support more options in customConfig for wrapWithSandbox - #420

Open
gpanders wants to merge 1 commit into
anthropics:mainfrom
gpanders:push-yxnoqppnpsws
Open

feat(sandbox): support more options in customConfig for wrapWithSandbox#420
gpanders wants to merge 1 commit into
anthropics:mainfrom
gpanders:push-yxnoqppnpsws

Conversation

@gpanders

Copy link
Copy Markdown

The customConfig parameter of wrapWithSandbox accepts more options than are actually forwarded to the underlying sandbox. For instance, allowUnixSockets, enableWeakerNetworkIsolation, and allowAppleEvents can be set in customConfig today, but it has no effect on wrapWithSandbox because those fields are ignored.

This commit reads those values from customConfig when creatin the sandbox, falling back to the default value if unspecified.

@gpanders
gpanders force-pushed the push-yxnoqppnpsws branch from 8ef3ab4 to a806eb7 Compare July 27, 2026 17:22
@gpanders
gpanders force-pushed the push-yxnoqppnpsws branch 4 times, most recently from b9fed1d to ca646c3 Compare August 11, 2026 19:36
jonathanKingston added a commit to copse-dev/agent-pane that referenced this pull request Sep 7, 2026
## Summary

- add an explicit, off-by-default macOS permission for Copse's native
`git_commit` subprocess to reach the single Unix socket named by
`SSH_AUTH_SOCK`
- preserve the existing filesystem and internet-deny sandbox, and
replace path-configured SSH signing keys with an inline public identity
so the private key and `.ssh` directory remain unreadable
- pin a one-line sandbox-runtime patch so the documented per-spawn
`allowUnixSockets` override reaches the macOS seatbelt profile
- explain the Git-hook/agent capability boundary in Settings and the
shell-permissions documentation

Closes
[#2320](#2320).

The dependency patch can be removed after
[anthropics/sandbox-runtime#420](anthropics/sandbox-runtime#420)
ships in a release.

## Security boundary

The grant is macOS-only, requires explicit user consent, validates that
`SSH_AUTH_SOCK` is an absolute normalized socket, and applies only to
the native commit spawn. Network domains remain denied. Git hooks
inherit the commit process and can ask ssh-agent to use any loaded key,
so the UI recommends `ssh-add -c`.

## Validation

- `pnpm test -- git-commit-signing` — 12 passed
- `pnpm test` — 8,555 passed
- `pnpm run typecheck`
- `pnpm run lint`
- `pnpm run format:check`
- `pnpm run check:dead-code`
- `pnpm run check:oracle`
- `pnpm run check:e2e-syntax`
- `pnpm run demo:site:check`
- `pnpm run build`
- `pnpm install --frozen-lockfile --ignore-scripts`
- focused Electron e2e: 2 passed
- `git diff --check`

## Visual evidence

![Commit signing
permission](https://raw.githubusercontent.com/copse-dev/agent-pane/copse/something-went-wrong-in-another-copse-thre-d07699/tests/e2e/screenshots/git-commit-signing-permission.png)

Co-Authored-By: Copse <noreply@copse.dev>
Copse-Models: acp:codex-acp#gpt-5.6-sol, acp:claude-acp#opus[1m]

---------

Co-authored-by: Copse <noreply@copse.dev>
Co-authored-by: copse-release-bot[bot] <304038887+copse-release-bot[bot]@users.noreply.github.com>
Co-authored-by: jonathanKingston <338988+jonathanKingston@users.noreply.github.com>
The customConfig parameter of wrapWithSandbox accepts more options than
are actually forwarded to the underlying sandbox. For instance,
`allowUnixSockets`, `enableWeakerNetworkIsolation`, and
`allowAppleEvents` can be set in `customConfig` today, but it has no
effect on `wrapWithSandbox` because those fields are ignored.

This commit reads those values from `customConfig` when creatin the
sandbox, falling back to the default value if unspecified.
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