0097: macOS Seatbelt via sandbox-exec, untested
Status: Accepted (default; pending owner confirmation)
Amends no existing ADR.
Context
M10 adds sandboxed child processes on macOS as well as Linux. The macOS path must fail closed and express the same basic filesystem and network restrictions without claiming testing that CI does not perform.
Decision
Under __APPLE__, the sandbox launcher executes
/usr/bin/sandbox-exec -p <SBPL> with a
deny-default profile. The profile allows required system reads,
reads and writes under the selected filesystem root according to
its mode, and denies network operations. The profile builder and
path escaper are portable C and are covered by tests, including
quoting, backslashes, newlines and non-UTF-8 paths.
The launcher fails closed if sandbox-exec is
unavailable. Documentation must state: macOS: implemented,
untested in CI. Portable profile-generation tests on
Linux do not constitute a test of the macOS exec path or its
policy behavior on macOS.
Alternatives considered
- Use the private
sandbox_init_with_parametersinterface: rejected in favor of invoking the systemsandbox-exectool with an explicit profile.
Consequences
macOS has an implemented sandbox path, but its integration remains an open verification item until exercised on macOS. No claim of macOS enforcement is made by Linux-only tests.