News for hackers. Stuff that matters.
Re:macOS: App sandboxing via sandbox-exec (2020) by meatjuice on Sunday July 03, 2022 @11:54PM (#31973338)
LGTM. Is it really deprecated?
Re:macOS: App sandboxing via sandbox-exec (2020) by jmillikin on Monday July 04, 2022 @12:07AM (#31973393)
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:

https://github.com/bazelbuild/bazel/issues/10068

https://github.com/bazelbuild/bazel/issues/13766

Re:macOS: App sandboxing via sandbox-exec (2020) by sluongng on Monday July 04, 2022 @07:30AM (#31975893)
It's might be worth to note that Apple is now using Bazel internally and have an active engineering team working on Bazel-related projects. So I would hope if they were to have any bone to pick with usage of `sandbox-exec` in Bazel, they would be able to introduce an alternative upstream.
Re:macOS: App sandboxing via sandbox-exec (2020) by saagarjha on Monday July 04, 2022 @08:18AM (#31976241)
Apple is large and diverse. If there is a team using Bazel internally, it is very possible that they have zero influence on what gets contributed upstream or how sandboxing is done on macOS.
Re:macOS: App sandboxing via sandbox-exec (2020) by traceroute66 on Monday July 04, 2022 @04:19AM (#31974738)
As per RTFM ...

     > 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.
(Their all-caps, not mine)
Re:macOS: App sandboxing via sandbox-exec (2020) by saagarjha on Monday July 04, 2022 @12:19AM (#31973451)
No. It’s the recommended way to sandbox software on macOS. The “this is deprecated” comment is just to keep the undesirables out.
Re:macOS: App sandboxing via sandbox-exec (2020) by Someone on Monday July 04, 2022 @04:58AM (#31974987)
Reading https://developer.apple.com/forums/thread/661939, I’m fairly sure the recommended way to sandbox individual processes is to use the Endpoint Security Framework (Quinn “the Eskimo” has been with Apple for decades. I trust him to know)

(For sandboxing systems, use the Hypervisor framework or, if you want to run Linux, the Virtualization framework built on top of it)

Re:macOS: App sandboxing via sandbox-exec (2020) by saagarjha on Monday July 04, 2022 @05:29AM (#31975165)
Quinn is wrong. The recommended way for third parties to sandbox their code definitely remains the one the platform provides. That it is not considered to be stable is expected and the relationship between third party developers and Apple for this API has been consistent for at least the last decade.
Re:macOS: App sandboxing via sandbox-exec (2020) by mike_hearn on Monday July 04, 2022 @06:22AM (#31975498)
Endpoint Security isn't usable for this. It's meant as a stable API for virus scanners, basically.

The sandboxing API is internal, but, Chrome uses it extensively. So Apple is limited in how much they can break it, otherwise new macOS versions can't run Chrome.

Re:macOS: App sandboxing via sandbox-exec (2020) by wmichelin on Monday July 04, 2022 @01:50AM (#31973845)
Source?
Re:macOS: App sandboxing via sandbox-exec (2020) by saagarjha on Monday July 04, 2022 @05:31AM (#31975179)
Several years of observing Apple's security team and what the largest third party sandbox clients (…browsers) are doing.
Re:macOS: App sandboxing via sandbox-exec (2020) by xnyhps on Monday July 04, 2022 @08:22AM (#31976275)
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.