Smith::Sandbox::MacOS
Inherits Smith::Sandbox::Strategy < Reference < Object
macOS, via sandbox-exec and a generated SBPL profile.
sandbox-exec is documented as deprecated and has been shipping anyway;
measured on macOS 26.5.2 it costs about 5 ms per call and prints nothing.
The deprecation is a reason to keep this behind Strategy — the day the
binary is gone, available? says so and smith degrades out loud.
Constructors
Class methods
Instance methods
The profile, as SBPL. Passed with -p, so there is no file to create,
find again or clean up.
Order matters: SBPL takes the last matching rule, which is why the
read denials come after the blanket read allowance and the port
allowance after deny network*.
Whether this command would actually be confined. False for everything when the strategy is off, and false for a command the user listed as unsandboxed.
Program and arguments, kept apart. The command stays a single argv entry
handed to bash -c, so nothing here can turn it into a second round of
shell parsing.