Skip to content

fix: always allow localhost bind/inbound in macOS Seatbelt profile#12

Merged
tito merged 1 commit intomainfrom
mathieu/align-bind-inbound-mac-linux
Mar 13, 2026
Merged

fix: always allow localhost bind/inbound in macOS Seatbelt profile#12
tito merged 1 commit intomainfrom
mathieu/align-bind-inbound-mac-linux

Conversation

@tito
Copy link
Contributor

@tito tito commented Mar 13, 2026

Summary

  • On macOS, the Seatbelt sandbox's (deny default) blocked network-bind and network-inbound, preventing tools from starting local servers (e.g. Claude's /login OAuth callback on port 0)
  • On Linux, the isolated network namespace allows unrestricted local binding; this aligns macOS behavior to match
  • Outbound connections to localhost remain gated on AllowLocalOutbound, preserving the security boundary

Test plan

  • Run greywall -- claude on macOS and verify /login OAuth flow completes
  • Verify sandboxed processes can bind to localhost ports without needing allowLocalBinding in config
  • Verify sandboxed processes still cannot make outbound connections to localhost services (unless allowLocalOutbound is set)
  • Run make test on both platforms

On macOS, the Seatbelt sandbox denied network-bind and network-inbound
by default, requiring AllowLocalBinding to be set per-agent. This broke
OAuth login flows (e.g. Claude /login) which start a local callback
server on a random port.

On Linux, the isolated network namespace allows unrestricted local
binding. Align macOS behavior by always including localhost bind/inbound
rules. Outbound to localhost remains gated on AllowLocalOutbound.
@tito tito merged commit 2d17bfc into main Mar 13, 2026
4 checks passed
@tito tito deleted the mathieu/align-bind-inbound-mac-linux branch March 13, 2026 00:58
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