Skip to content

Design: a Unix socket allowlist that holds on both platforms #593

Open

Description

@lydakis

Background. With the network on, which is Sonny's default, a sandboxed command reaches every Unix socket except the daemon's and the other bots'. That includes Docker, Podman and desktop buses, which run whatever they are asked outside the sandbox. On 11-01 George kept this as an accepted boundary for now (#531, #578). The reasoning: it follows Codex, it maximizes what bots can do, and it is documented in SECURITY.md.

Why revisit. In Codex, network access is off by default, so "every socket" only applies once the person opts in. Sonny turns the network on for every bot, so that opt-in trade-off is our default. Codex itself is moving to a per-socket allowlist: "No Unix socket destinations are allowed until you add explicit allow rules", with dangerously_allow_all_unix_sockets as the bypass (docs). Codex's version is unfinished: the profile config is ignored on macOS (openai/codex#25416) and Linux is tracked in openai/codex#16910.

The hard part. On macOS, Seatbelt can allow sockets by path. On Linux, seccomp can't tell one socket path from another, so a real allowlist there needs a small socket proxy, which is what Codex's network proxy does. A macOS-only allowlist would be half support, so this has to work on both platforms or not ship.

Shape to discuss.

  • Network on keeps working for the workflows that matter by default: ssh-agent (SSH_AUTH_SOCK), MCPX's socket, and the bot's own capability socket.
  • Docker, Podman or a desktop bus each take one unix_sockets line.
  • The allowlist is enforced by path on macOS and through a proxy on Linux.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions