Author of the submitted article here. Your write-up was one of many I went through when I first stumbled upon sandbox-exec and it was tremendously helpful, so thank you. I believe it should also be linked from the blog post I made. The main reason I wrote a separate blog post instead of adding a few bookmarks here and there is that I use my blog as open lab notes. It's easy to find and go back to ideas I've previously visited, and also to find references for more sources if I need to dig deeper into something.
oh, yeah, sandbox-exec is fun. for the record, the exact scheme they use is tinyscheme. the whole facility is largely undocumented, but it still somehow manages to be friendlier than seccomp -- i remember learning about it in a talk on the nix macos effort
The macOS sandbox isn't "deprecated", but it's treated as an internal detail of the OS subject to change without warning. Maybe the message is intended to warn people away from using the "sandbox-exec" tool?
Periodically some third-party software will inadvisedly try to use sandbox-exec and encounter problems when the policy changes. Some examples I've run into with Bazel:
> man sandbox-exec
> The sandbox-exec command is DEPRECATED.
> Developers who wish to sandbox an app should instead adopt the App Sandbox feature described in the App Sandbox Design Guide.
I think Apple doesn’t want third-party developers to compose their own sandboxing rules, because it’s pretty hard to do that in a way that can’t be escaped and that doesn’t break Apple’s frameworks. They provide the Mac Application Sandbox profile for third-party developers. That profile is quite flexible, and if you’re not targeting the Mac App Store there are some ways to add rule exceptions.
[+] [-] jmmv|3 years ago|reply
[+] [-] Etheryte|3 years ago|reply
[+] [-] 7402|3 years ago|reply
[+] [-] iansinnott|3 years ago|reply
[0]: https://github.com/lynaghk/sandboxtron
[+] [-] staticfloat|3 years ago|reply
You can see some Julia code that generates the sandbox config rules here: https://github.com/JuliaCI/sandboxed-buildkite-agent/blob/ma...
[+] [-] 0x69420|3 years ago|reply
you can “enjoy” the sight of some c++ directly generating scheme here: https://github.com/NixOS/nix/blob/2.9.2/src/libstore/build/l...
[+] [-] shepting|3 years ago|reply
[+] [-] astrange|3 years ago|reply
[+] [-] meatjuice|3 years ago|reply
[+] [-] jmillikin|3 years ago|reply
Periodically some third-party software will inadvisedly try to use sandbox-exec and encounter problems when the policy changes. Some examples I've run into with Bazel:
https://github.com/bazelbuild/bazel/issues/10068
https://github.com/bazelbuild/bazel/issues/13766
[+] [-] traceroute66|3 years ago|reply
[+] [-] saagarjha|3 years ago|reply
[+] [-] xnyhps|3 years ago|reply
[+] [-] GoOnThenDoTell|3 years ago|reply