Skip to content

Revisit the macOS sandbox #6

Description

@leafo

Need to revisit the macOS sandbox implementation to ensure it's adequate.

First stage c924c46

  • Added SandboxConfig.PolicyMode (balanced default, legacy fallback)
  • Added macOS support for SandboxConfig.NoNetwork in generated sandbox policy
  • Added macOS environment allowlist handling with SandboxConfig.AllowEnv
  • Fixed naked executable launch path to invoke sandbox-exec correctly
  • Balanced (default) restricts /dev access to specific safe nodes (e.g. /dev/null, /dev/urandom) and removes broad /private read access, while legacy keeps the previous permissive rules (/dev/* and /private/*).
  • replace broad pkill -f matching
  • update tests

Verification

  • Test launching basic game
    • .app bundle game
    • non-.app (naked executable) game
  • Test games with save files, confirm that the save files are loaded
  • test with the sample evil app

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