I am not even sure if it is Gatekeeper that kills it, all I was able
to find was crash report with code signing specified as an reason of
the crash.
So, Gatekeeper is a user-level term for a variety of underlying technologies. A
launchd daemon will never generate a Gatekeeper alert because it’s not running in a user context. It is, however, subject to Gatekeeper (at least on modern systems).
The most common cause of this problem is a rogue library load command in your executable or one of the libraries it uses. When library validation is enabled Gatekeeper doesn’t check these because it knows that library validation will protect you from loading bogus code.
However, in this case I think the issue is more straightforward: The trusted execution system, as a matter a policy, requires that EndpointSecurity clients have the hardened runtime enabled and that they not apply any
hardened runtime exceptions [1]. Thus your ES daemon won’t be able to disable library validation.
What sort of third-party code are you trying to load? Does your daemon support some sort of plug-in mechanism? Or are you shipping a library with your product that just happens to be signed by someone else.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"[1] IIRC the very latest OS releases have an exception to this policy, namely that they are allowed to use
com.apple.security.cs.allow-jit, but that’s not relevant to your situation.