Dear meaton, Dear eskimo,
Thank you for your quick and helpful responses, as always!
I tried the steps you outlined, and indeed the sandbox no longer gets in the way once I run from /Applications!
Some further info, for the benefit of future readers: It is not enough to drag the app over from the products folder inside xcode (which will only create a link), but you have to actually move or copy the .app file.
At least on Catalina it is still necessary to include a com.apple.security.temporary-exception.files.absolute-path.read-write entitlement for /private/var/db/mds/, or else even SecCodeCopySelf fails, which I believe is because of the bug linked above.
I do have reservations about deploying an app that relies on the Container app and
the Network System Extension communicating back and forth.
I’ll provide some further information that would hopefully alleviate your concerns:
There are basically two kinds of messages we send: User-provided configuration information that the container app sends configuration information to the system extension, mostly about how to talk to our remote backend. This will only happen rarely, potentially only once when the first user starts and “activates” the product for the first time. This is what should ideally be protected from random apps messing with the configuration.
Status information sent from the system extension to the container app
The latter is
2a) about whether dns traffic is currently being intercepted, as this depends not only on the DNSProxy being active, but also on the system extension having a connection to our remote backend, and
2b) an event indicating that a flow has just been blocked. We use this to spawn a notification to inform the user. The system extension can’t spawn these notifications itself since, as you say, it is not running as the user.
In particular, we are not sending back and forth data about every individual flow, nor are we making decisions about whether to allow flows inside the container app. If no container app is connected via XPC, the system extension will still continue to work properly and do its job, it will simply be less visible to the user.
I think this is very similar to the SimpleFirewall example from WWDC linked above.