Endpoint Security: preventing exec after the ES client disconnects or exits

I'm evaluating Endpoint Security for a supervised macOS worker and a separate evidence collector. This is a question about supported API guarantees; I don't have a reproduced macOS bug.

Before collection starts, I need to identify the worker's successful initial executable image. That image must remain current until every collector read and its resulting copy or storage operation has finished, including operations that ultimately report failure. Here, "remain current" means preventing replacement by a later successful exec, not preventing ordinary memory changes within the running program.

The proposed policy would authorize the initial exec, then deny subsequent ES_EVENT_TYPE_AUTH_EXEC requests for that worker while collection is active. This is a design under consideration, not an implemented or tested guard.

The unresolved case is loss of the ES client while a collector operation is already in flight. If the client crashes, is deleted, or disconnects:

  • What happens to an exec authorization request already pending at that point?
  • What governs later exec attempts after the client is gone?

Can a supported mechanism keep exec replacement blocked until the collector's in-flight operations finish, while allowing shutdown within a finite bound? A later health check would not cover an interval in which replacement was already allowed.

I reviewed Apple's WWDC20 Endpoint Security session, but haven't established a documented client-loss guarantee for this requirement. I'm asking about client loss separately from an authorization-response deadline expiring.

Please point me to the applicable public API contract, including macOS/SDK availability and entitlement requirements. If Endpoint Security cannot provide this guarantee, that limitation would help me reconsider the design. Any supported ordering requirement for establishing the initial successful exec before the first collector read would also be useful.

I have narrowed the question using the current Endpoint Security documentation.

es_set_deadline_miss_mode with ES_DEADLINE_MISS_MODE_FAIL_CLOSED documents denial for missed AUTH deadlines and for AUTH messages dropped because the queue was full. Does this policy have any documented effect when the client is destroyed or disconnects, rather than remaining alive and missing its deadline?

Specifically, what happens to:

  1. An AUTH_EXEC request already pending when the guarding client crashes, disconnects or is destroyed with es_delete_client?
  2. A later exec attempt after that client is gone, while the separate collector still has an in-flight read or associated copy/storage operation?

I also reviewed es_new_descendants_client and es_sync_client. The sync documentation says its callbacks also run on client destruction, so I am not treating a callback alone as proof of a live guard or a successful initial exec.

Is there a supported public mechanism that establishes the initial successful executable image before the first collector read, excludes subsequent exec replacement until all collector effects finish (including failed operations), survives the relevant client/owner-loss cases, and permits finite shutdown?

The current documentation metadata lists macOS 27.0 for these newer functions; I have not validated a deployment or SDK combination. A public contract with the supported versions, entitlements and release conditions—or confirmation that Endpoint Security cannot provide this guarantee—would help determine the design. This remains an API-contract question, not a reproduced operating-system bug.

Are you working on the same product as this person and this person?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Endpoint Security: preventing exec after the ES client disconnects or exits
 
 
Q