Endpoint Security

RSS for tag

Develop system extensions that enhance user security using Endpoint Security.

Posts under Endpoint Security tag

200 Posts

Post

Replies

Boosts

Views

Activity

Endpoint Security: pending AUTH_CREATE and new operations after the last client disappears
I am reviewing the supported Endpoint Security API contract for a design targeting macOS 27.2. I have not activated an Endpoint Security extension or reproduced this scenario. This is a question about documented API behavior. In “Build an Endpoint Security app” at WWDC20, Apple explains that Endpoint Security applies an implicit allow result when no clients are subscribed to an event’s AUTH variant. The current documentation for es_set_deadline_miss_mode describes handling missed authorization deadlines. It also documents denial when an AUTH message is dropped because the queue of a client configured with ES_DEADLINE_MISS_MODE_FAIL_CLOSED is full. Consider a single client created with es_new_client, subscribed to ES_EVENT_TYPE_AUTH_CREATE, and configured with ES_DEADLINE_MISS_MODE_FAIL_CLOSED. What supported behavior applies in these two situations? An AUTH_CREATE request has already been delivered and remains unanswered when the client crashes, disconnects, is destroyed with es_delete_client, or unsubscribes while remaining connected. How is that pending request resolved? Please distinguish these cases if their behavior differs. A new, otherwise permitted creation is attempted while no client is subscribed to AUTH_CREATE. Does the implicit-allow rule described at WWDC20 still apply on macOS 27.2, regardless of the previous client’s FAIL_CLOSED setting? We need to determine whether the design requires an independent control during the interval without a subscribed client. References to the supported contract, applicable versions, and conditions would be very helpful. References: https://developer.apple.com/videos/play/wwdc2020/10159/ https://developer.apple.com/documentation/endpointsecurity/es_set_deadline_miss_mode(_:_:) https://developer.apple.com/documentation/endpointsecurity/es_delete_client(_:) https://developer.apple.com/documentation/endpointsecurity/es_unsubscribe_all(_:)
2
0
148
14m
Can macOS tracing identify the process that received a specific iCloud Drive write request?
I’m investigating file-write attribution for iCloud Drive on an Apple silicon Mac running macOS 26.6.2. For a specified file, I’d like to correlate three pieces of information for the same operation: the process that initiated the request, the process that received it, and the process that performed the filesystem write. The receiver and the writer may be different processes. In a read-only review of existing logs, I could correlate several File Provider job events by item identifier. Those entries were logged by fileproviderd. I also checked the Endpoint Security XPC connection event, which exposes the service name and domain type. I haven’t found a way to use those records to identify the process that received an individual request, especially when it travels over an already-open XPC connection. Is there a supported macOS API or tracing workflow that can correlate a specific request to its receiving process and the corresponding file operation? If so, which fields should I use to join the events, and what permissions are required? If the available tools can attribute the filesystem write, how can I tell whether the receiver of the original request is also observable?
1
0
33
4h
Can macOS report all pending, active, and retrying iCloud Drive operations for a specific file?
I’m building a read-only diagnostic for iCloud Drive on an Apple silicon Mac running macOS 26.6.2. Given a local file URL or a File Provider item identifier, I’d like to determine whether any sync operations are queued, running, or waiting to retry for that file. From a normal user session, I can resolve an iCloud Drive file to its File Provider item and domain identifiers. However, calling NSFileProviderManager.getDomainsWithCompletionHandler returns NSFileProviderErrorDomain error -2001 (providerNotFound). I can also correlate some job registration and completion events in the unified log by item identifier, but I haven’t established whether those logs cover every operation for the item. Is there a supported API or diagnostic tool that returns a complete point-in-time list of queued, running, and retrying operations for a specified iCloud Drive file? If so, what permissions are required, and how can the caller distinguish a complete result with zero operations from an incomplete, delayed, or unavailable result? If a complete list is unavailable, what per-file state can a third-party diagnostic reliably report?
1
0
31
4h
Does es_sync_client completion exclude a dropped final notification?
This is a public API contract question about macOS 27 EndpointSecurity, not a reported bug, observed loss, or tested reproducer. We need to distinguish draining messages admitted to a client queue from establishing that every relevant generated notification was delivered, including the final one. For this hypothetical case, assume one exact, nonnull client instance remains live in the same epoch throughout the request and callback. Its required subscriptions and unmuted scope have been verified. The sync call is made outside its ES handler; no client deletion, replacement, or cancellation occurs. A null-client immediate callback or a callback caused by destruction would not qualify. Also assume an ordered application writer has committed every record delivered to it; that receipt does not establish kernel completeness. Consider the following schematic sequence: A, the last numbered message, is received → an in-scope NOTIFY B may be generated and dropped → es_sync_client returns success and its callback completes → no subsequent numbered message is received. B represents a notification associated with an operation intended to precede the synchronization cut. Whether that operation's completion establishes B's enqueue position relative to the marker is part of the contract question, not an assumed scheduling guarantee. We understand the documented synchronous-enqueue relationship for completed syscalls. The sequence counters compare received messages, while WWDC20 also describes queue-full drops. We are not asserting that this hypothetical history occurs on any particular release. For an operation with the required pre-marker ordering established, does successful sync completion on the live client exclude a generated-but-dropped B, rather than only confirm processing of messages actually ahead of the marker in the queue? If it does not, is there a supported terminal sequence watermark, drop result, or equivalent interface that can establish loss-free delivery for that finite cut without waiting for another numbered notification? Which public contract specifies the required causal-ordering and client-lifecycle conditions, applicable macOS/SDK versions, and loss semantics—or, if this stronger guarantee is unavailable publicly, can you confirm the supported boundary? This question does not request global quiescence, termination of all descendants, private implementation details, or a workaround that weakens identity checks. References: es_sync_client global_seq_num seq_num WWDC20: Build an Endpoint Security app, 37:27
1
0
123
20h
Detecting or restricting ScreenCaptureKit capture of a specific app's windows
Hi, I'm exploring macOS options to protect the windows of selected apps from being screen-captured or recorded by other apps (enterprise Macs, managed via MDM). Is there a supported API or Endpoint Security event that tells when a process starts a screen capture or recording (ScreenCaptureKit), and whether it captures a display or a single window? Is there a supported way, for example via MDM, to prevent other apps from capturing a specific app's windows? NSWindow.sharingType = .none no longer seems to exclude a window from ScreenCaptureKit on macOS 15 and later. Is this expected, and is there an alternative? Tested on macOS 26.3.1 (Apple silicon). Thanks.
4
0
170
3d
Endpoint Security Entitlement Still Pending After 62 Days
I am developing AI Device Guard, a macOS security application designed to protect users against unauthorized activity initiated by AI-powered software and autonomous agents. I submitted my Endpoint Security Client entitlement request on September 30, 2026. As of December 1, 2026, the Apple Developer portal shows: Endpoint Security: Submitted Endpoint Security (development): Assigned Time outstanding: 62 days I have contacted Apple Developer Support multiple times and formally requested escalation, but have not received a substantive response. The outstanding entitlement is preventing me from completing production-level security enforcement, validation and distribution. Has anyone experienced a similar delay? Could an Apple engineer advise on the appropriate escalation process or assist in determining whether additional information is required? I can provide the original entitlement request ID and support case number privately to an Apple representative. Thank you for any assistance.
0
0
31
3d
Supported per-operation fresh administrator authentication in macOS
I am developing a macOS security application that requires strictly controlled, attended administrative operations through a protected privileged helper. Security requirements Fresh native administrator authentication for every privileged operation. Explicit confirmation of the exact operation. Cryptographic binding between the operation, authorization and transaction. Durable single-use authorization and replay protection. No collection or storage of administrator passwords by the application. No reliance on previously cached administrative credentials. Testing performed In an isolated Apple silicon macOS virtual machine, we registered a temporary custom Authorization Services right with the following policy: class = user group = admin authenticate-user = true shared = false timeout = 0 allow-root = false session-owner = false Noninteractive authorization was correctly denied with OSStatus -60007. Interactive cancellation returned OSStatus -60006. However, an interactive authorization dialog did not display the operation-specific token supplied through kAuthorizationEnvironmentPrompt. Consequently, we could not establish that the administrator had been presented with the exact operation being authorized. We also reviewed the public Endpoint Security SDK declarations for authentication, authorization petition and authorization judgement events. Although audit tokens identify participating processes, we could not identify a documented per-evaluation causal identifier linking these events. The temporary authorization right was subsequently removed. Technical questions Does macOS provide a supported public API that guarantees fresh administrator authentication for each individual evaluation of a custom authorization right? Can a trusted privileged helper independently verify the freshness of that authentication, the authenticated administrator's identity and its association with a specific authorization evaluation? Is there a documented mechanism for causally correlating Endpoint Security authentication, authorization petition and authorization judgement events, including concurrent requests and event loss? Can AuthorizationCopyInfo, LocalAuthentication or a supported authorization plug-in provide the required evidence without the application collecting administrator credentials? What supported architecture does Apple recommend for cryptographically binding fresh native administrator authentication to a specific, single-use privileged operation? We are seeking a documented and supported security architecture rather than a workaround or a reduction of macOS security protections. If these guarantees are not currently available through public APIs, confirmation of that limitation would also be extremely helpful. Thank you for your technical guidance.
1
0
395
3d
Full Disk Access on macOS 27.3
I'm looking into the changes being implemented and I find this way of handling by Apple on short notice problematic. Now our customers (those that don't have MDM) will have to jump through hoops to enable FDA for our product, a security product that also uses Endpoint Security. We already have the entitlement for endpoint security, which requires FDA in order to work, so why make it so difficult instead of just allowing FDA for apps that have this entitlement? Why only backup applications are exempted?
3
0
233
4d
Can macOS verify a worker’s effective sandbox policy before it runs?
I’m building a local app on an Apple silicon Mac. Before a worker or any of its child processes can run, I need to verify the worker’s effective filesystem and network restrictions, including inherited restrictions. I need to allow that same pending launch only if the policy matches, and deny it if verification fails or times out. I reviewed Apple’s App Sandbox guidance and the Endpoint Security documentation for exec authorization and entitlement metadata. I haven’t found documentation showing that these expose the complete effective policy for the pending launch. Is there a supported public macOS API that provides this guarantee? If so, which API and macOS versions support it? If not, is this outside what the public APIs can verify?
1
0
248
2w
AuthorizationRightSet called from an endpoint security extension fails with -60008
The Mac has managed profiles installed giving the endpoint security process full disk access. Most Macs do not get this error and AuthorizationRightSet works properly. However, one Mac gets the -60008 error and I can't determine the cause. Should an endpoint security extension be able to call AuthorizationRightSet?
1
0
105
2w
Supported vnode metadata access after same-UID libproc queries return EPERM
We need a documented interface/access contract for a test supervisor that requires a bounded, process-birth-bound census of every process with its effective UID and every current vnode descriptor of those processes. Coverage includes ambient same-UID processes and descriptors opened before observation starts. The census needs vnode identity, type, ownership, mode, link count and open flags. Unavailable metadata is a refusal; we cannot treat EPERM as absence or exempt a process or descriptor. This is a cooperative same-user lifetime-containment check. We do not require file contents or an atomic global snapshot. Environment of the retained observation: Apple Silicon, macOS 27.3 (26C5035r), Darwin 27.3.0; Xcode 27.0 (27A5194q), macOS 27.0 SDK. The subject was the system LaunchServices process /usr/libexec/lsd. Caller real/effective UID matched the subject's UID/RUID/SVUID. Before/after process identity, version, start time, credentials and executable-path samples matched. PROC_PIDLISTFDS returned 32 bytes and listed FD 3 as PROX_FDTYPE_VNODE. The following call shape returned 0 bytes with errno == EPERM (1), with 176 bytes expected in that environment: struct vnode_fdinfo info = {0}; errno = 0; int count = proc_pidfdinfo(pid, fd, PROC_PIDFDVNODEINFO, &info, sizeof(info)); int saved_errno = errno;Errno was cleared before and saved immediately after the call. Credentials were not modified. The matching process bracket does not establish an FD-to-path association or a specific protection category. In particular, we have not established a Data Vault subtype. Questions: Is there a supported public interface or provisionable entitlement that supplies the required metadata for every current same-UID vnode descriptor, including descriptors whose metadata is protected internally by macOS? If Endpoint Security is the supported route, which documented API supplies a complete current FD inventory and vnode mapping, including already-open descriptors and ambient same-UID processes? A solution limited to descendants of the client does not cover this requirement. If supported interfaces cannot guarantee that coverage, could you clarify the limitation? Is there a supported diagnostic that identifies the protection category responsible for this metadata denial without inspecting private policy state? I have considered the "On File System Permissions" guidance, including its mandatory-access-control and Endpoint Security discussion: https://developer.apple.com/forums/thread/678819 This post describes a retained observation, not a new reproduction or qualification result. All retained results remain UNPROVED. A focused SDK/libproc Xcode example was previously built for arm64 and x86_64 but was not run; it illustrates the call sequence and a BSD start/credential bracket, not complete kernel birth binding or the required census. It does not guarantee reproduction on another system. The sanitized supporting record and example are already attached to the private DTS request that directed me to the forums. Please advise the supported interface/access contract, or its limitation, and any further diagnostic scope needed.
1
0
122
2w
Supported SIP-on evidence for descriptor 0 at child creation/exec on macOS 27.0.1 (26A434), arm64
We need one written, reviewable capability response for the recorded system configuration: macOS 27.0.1, build 26A434; Darwin 27.0.0; xnu-13432.1.9~1/RELEASE_ARM64_T8103; arm64. These are retained host observations, not a new claim of kernel/source equivalence. The target is an application-owned non-platform Conda CPython process using its original subprocess.run/Popen calls with stdin/input omitted. We must keep System Integrity Protection enabled, preserve the original interpreter and global Python settings, and preserve executable, argv, environment, Path objects, stdin choices, timeouts, return/exception behavior and cleanup. We cannot replace the launch with a debugger-owned PTY, DEVNULL, wrapper, or changed timeout. A single harmless-target capability attempt has already been consumed. Authentication succeeded; the target's process credentials were uid/euid 501, gid/egid 20, with process group vector [20]. In that exact attempt DTrace reported at line 11: "probe description syscall:::entry does not match any probes. System Integrity Protection is on". No trace records or begin/end receipts were obtained; the target gate stayed closed and both recorded children were reaped during bounded cleanup. The diagnostic script path is intentionally omitted here; the original local raw text is preserved. We are not attributing every possible native-observation limitation solely to SIP, and we will not rerun that attempt. The single requested deliverable is CAPABILITY-RESPONSE.json (or one equivalent signed/versioned document), answering whether a named, supported mechanism on this exact configuration provides EITHER: A. A synchronous record of each original child's descriptor-0 underlying object at the accepted fork/exec boundary, including type, object/device identity and descriptor/access flags; OR B. A complete no-transient-change proof from an independently accepted descriptor-0 identity anchor over the entire original interval, covering every relevant thread and child from birth without a registration race. Please include these sections in the ONE response: disposition: SUPPORTED / UNSUPPORTED / NOT_ESTABLISHED; route A or B; responding organization/product, supported API/tool and exact version; links to public contract or a reviewable vendor coverage statement applicable to this OS/build/architecture. permissions: exact privileges, supported signing/entitlement eligibility and installation requirements; explicit statement that SIP and global Python stay unchanged. Do not assume administrative privilege alone gives kernel visibility. boundary_and_scope: how parent/child stable identities, fork/exec phase, all relevant threads and descendants, birth-registration ordering, PID reuse and cross-CPU ordering are handled; when capture starts and stops relative to the original anchor/call. coverage_and_loss: the exact guaranteed events/object fields; proof or documented guarantee of coverage; missing-event/drop/buffer-overflow/sequence-restart/error detection; the independent acceptance rule must reject any unknown interval or loss. For route B, enumerate applicable descriptor writers including direct/noncancel/guarded syscalls, open/close/dup/fcntl, received descriptors/fileports, spawn/exec file actions and close-on-exec, plus concurrency/cancellation/signal/startup paths. A short illustrative syscall list is insufficient. raw_contract: a minimal raw-record schema or already existing reference example, with observed fields distinguished from derived fields; stable process identity, phase, timestamps/sequence domain, descriptor/object identity, raw returns/errno, and coverage/error status. A source-version match or pathname alone is not an object-identity witness. preservation: how original call arguments, stdin/input omission, results/exceptions, original timeouts, original PID/wait/reap/raw streams and cleanup remain intact, and any observer effects. We cannot add waits, kills, reads or retries to fill missing original evidence. prospective_validation: a finite, independently reviewable validation plan only, with success criteria and false-acceptance controls for missing records, descriptor replacement/ABA, unobserved early children and stream loss. No launch, sudo command, new probe iteration or installation is authorized by this request. If no supported mechanism satisfies either route, please say UNSUPPORTED and name the missing public capability; if applicability is unknown, say NOT_ESTABLISHED. Do not substitute a generic follow-fork setting, a late process/fd snapshot, an EndpointSecurity descriptor subset/type list, successful compilation, source version numbers, or a recommendation to disable SIP/change stdin. A positive written response permits only independent design/source/coverage review. It does not prove our actual descriptor-0 chain and grants no project verification credit. Only after pre-review passes could a separately bound, new finite observation request be considered. No historical missing data will be reconstructed or old completed validations repeated. This is one specific supported-API/capability question, not a request for Apple to develop our collector or disclose private implementation. No repository sources, account secrets, credentials, private paths or runtime databases are attached. No existing observation tool or build materials are requested from our end user.
1
0
165
4w
How to get file size before and after write operations using Endpoint Security?
Hello, I am working on an audit of file operations for a DLP agent. I am trying to implement this mechanism using Endpoint Security. One of the customer's requirements is that write event reports must provide information about the file size both before and after the write operation. The challenge is that the ES_EVENT_TYPE_NOTIFY_WRITE event does not provide information about the changes, and in the stat structure, I see the file's stat prior to the write event. I tried to implement a mechanism based on tracking the sequence of events (open -> write -> close), but it seems macOS does not guarantee such a sequence, as the agent receives ES_EVENT_TYPE_NOTIFY_CLOSE earlier than ES_EVENT_TYPE_NOTIFY_OPEN. Unfortunately, Auth events cannot be used due to no guarantee the DLP agent is the only ES client. Is there any way within the Endpoint Security Framework to guarantee the sequence of NOTIFY events? Are there any other supported (public) APIs or methods besides Endpoint Security to track file system changes? As far as I know, ktrace (which powers fs_usage) is a private framework. Thank you in advance!
6
0
184
4w
Can macOS enforce fail-closed AUTH_EXEC authorization if the Endpoint Security client fails?
Hello Apple Developer Community, I am designing a security-isolated Swift compilation workflow on Apple silicon macOS. The goal is to execute a compiler only within an explicitly authorized environment, without granting access to unrelated project files or privileged operations. I am investigating the Endpoint Security framework, specifically AUTH_EXEC, for enforcing execution authorization. Security requirements: Allow only explicitly approved compiler and linker executables. Validate executable identity and command-line arguments, including child process execution. Prevent unauthorized execution even if the authorization component crashes, disconnects, or fails to respond before its deadline. Ensure that restrictions cannot be bypassed by launching a different executable or using unexpected child process arguments. My understanding: Endpoint Security provides execution authorization events and APIs for inspecting process arguments. However, Apple's documentation indicates that missing an authorization deadline may result in implicit authorization. This raises an important question about enforcing a strictly fail-closed policy. Questions: Is there a publicly supported macOS mechanism that guarantees unauthorized process execution remains blocked when an Endpoint Security client becomes unavailable or misses its authorization deadline? Can Endpoint Security be combined with App Sandbox, launch constraints, or another supported security mechanism to provide this guarantee? Is there a supported way to enforce restrictions on child process executable identity and command-line arguments before execution? If these guarantees are not available, what isolation architecture would Apple recommend for executing an untrusted or potentially misbehaving compiler? Environment: Apple silicon Mac macOS 26.x Apple Swift 6.3.x Xcode and macOS SDK Local, non-privileged Swift compilation This is an architectural design question. No Endpoint Security system extension or privileged helper has been deployed. I would appreciate guidance on publicly supported APIs, security guarantees, and any relevant Apple documentation. Thank you!
0
0
258
Nov ’26
Endpoint Security authorization after client loss: pending requests and subsequent namespace operations
I am evaluating a hypothetical file collector that uses fixed approved directory roots. Its requirement includes rename-after-open: if another process moves an opened file or an ancestor outside the approved namespace, the collector must not continue accessing it there. This concerns input reads, directory enumeration, preview reacquisition, and writes to exclusively created output files. Retaining a previously approved descriptor or detecting a move after access does not meet the requirement. I am considering whether Endpoint Security can prevent the relevant namespace mutations before they occur for the complete access interval. No Endpoint Security client has been created or exercised for this candidate. This is a request for a documented, versioned contract, not permission to deploy a client, obtain an entitlement, or change the system. The deadline-mode documentation describes the response to an unanswered authorization within its deadline. The mode values describe deny without killing the client, allow without killing the client, and killing the client as the default. The setter documentation also describes denial of a queue-full AUTH drop under FAIL_CLOSED. I have not found, in the specific pages listed below, an explicit contract for the separate case of client loss. I am not assuming that deadline policy covers disappearance of a client. Could you clarify the following? Pending authorization at client loss For a relevant authorization such as ES_EVENT_TYPE_AUTH_RENAME or ES_EVENT_TYPE_AUTH_UNLINK that is already pending, what exact verdict applies if the matching client crashes, disconnects, is deleted with es_delete_client, or unsubscribes before responding? Please distinguish each case, including when it was the last matching client and when other matching clients remain. Does a configured FAIL_CLOSED deadline policy remain attached to that pending request after client loss? Operations after the last matching client is gone What controls a later rename, reparenting, exchange, unlink, or other relevant namespace mutation after the last matching client has disappeared or unsubscribed? Is there a supported policy that remains effective independently of that client's lifetime? Please distinguish new operations from an authorization that was already pending, including cached decisions and any interval before a replacement client is ready. A supported complete protection interval Is there a supported way, through Endpoint Security or another supported kernel-enforced mechanism, to keep the necessary namespace mutations denied from before the collector's first access until its final read/write ends, despite authorization-client loss, partial setup, or owner death? The mutating actor may be outside the collector's process subtree. A later watchdog termination, restart, or notification of a completed operation would not establish denial during the intervening interval. If protection must end before that interval is complete, please identify the exact limitation. Client types and failure cases Which guarantees differ between es_new_client and es_new_descendants_client? Beyond the unanswered-deadline and full-queue cases, does any deadline mode affect the cases in questions 1 and 2? Please identify any self-process, muting, caching, scope, or actor limitations that prevent the proposed all-relevant-mutator coverage. I am not assuming a descendant-scoped client can authorize operations by unrelated processes. Versioned support and prerequisites For any supported contract, please cite the public documentation or other authoritative reference, applicable released macOS versions, exact API and deployment configuration, and required entitlements, privilege, consent, or system-extension conditions. API introduction metadata alone is not being treated as evidence about an installed target, and an upgrade or privilege change is not assumed. If no public supported mechanism provides the requested interval, an explicit statement of the missing guarantee or required independent enforcement boundary would be useful. Public references reviewed https://developer.apple.com/documentation/endpointsecurity/es_set_deadline_miss_mode(::) https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_t https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_fail_closed https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_fail_open https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_kill https://developer.apple.com/documentation/endpointsecurity/client https://developer.apple.com/documentation/endpointsecurity/es_client_t https://developer.apple.com/documentation/endpointsecurity/es_new_client(::) https://developer.apple.com/documentation/endpointsecurity/es_new_descendants_client(::) https://developer.apple.com/documentation/endpointsecurity/es_delete_client(:) https://developer.apple.com/documentation/endpointsecurity/es_unsubscribe_all(:) The scoped document reviews did not establish the two client-loss cases above; this is not a claim that every relevant Apple document or mechanism has been exhausted. No real data, credentials, private artifacts, logs, or host identifiers are needed for this clarification.
3
0
398
Oct ’26
Supported macOS containment for a sandboxed worker after controller failure.
Subject: Supported macOS containment for a sandboxed worker after controller failure I'm investigating an Apple Silicon/macOS architecture in which an untrusted, signed, sandboxed worker must be independently containable by a separate trusted supervisor. The worker needs only a narrow authenticated communication channel. It requires no direct network access, external operational credentials, privileged file access or authority to launch helpers. I understand that App Sandbox does not inherently prevent child-process creation, and that RLIMIT_NPROC alone does not prevent every form of execution delegation. Could you clarify: Is there a public, supported macOS mechanism to deny all worker-originated subprocess creation and execution delegation at launch, while retaining one restricted communication channel? Alternatively, is there a supported mechanism for a surviving supervisor to identify, terminate and positively verify the complete execution domain of a worker, including any descendants, after its controller crashes or is suspended? What guarantees and limitations apply to stable identity, process exit, automatic relaunch and loss of the supervisor? I'm specifically seeking supported operating-system guarantees, not private sandbox profiles, polling, heartbeat inference or best-effort process-tree enumeration. The goal is to determine whether a bounded synthetic containment experiment is technically justified. No production implementation has been attempted.
5
0
236
Oct ’26
Keeping every descendant of a sandboxed XPC service’s worker inside its lifetime (fork, double-fork, setsid)
Apple DTS case 22893354: forum post and reply Apple asked for the question as a Developer Forums post, then a reply to the case email with the post URL. Nothing below has been posted or sent. 1. Forum post Post at https://developer.apple.com/forums/ (signed in, "Ask a question"). Suggested tags: XPC, App Sandbox, Endpoint Security Attach: fixtures/egress_guard/hp04/apple-descendant-sample/main.c, renamed to main.txt if the forum refuses .c. Title Keeping every descendant of a sandboxed XPC service's worker inside its lifetime (fork, double-fork, setsid) Body We are designing a macOS app that runs an unmodified third-party command-line tool for one task at a time. The plan is an app-bundled, sandboxed XPC service that launches the tool as a child process. The tool is not ours, so we have to assume it may fork without exec, double-fork, and call setsid(). For each run we need one guarantee: after the run ends, every process the tool created has stopped. "Ends" includes the XPC service crashing and the host app crashing, not only a clean cancel. If we cannot prove that, we cannot report the run as finished. What we have looked at so far: Killing the process group. A child that calls setsid() is no longer in the group. launchd's process-group cleanup for the job. As we read launchd.plist(5), that also covers the process group only. Tracking pids from fork and exit notifications, including Endpoint Security. Notifications can be dropped, and pids can be reused, so a list rebuilt from events is not proof that nothing is left. The attached sample shows the process shape without any sandbox or XPC. It starts a worker, the worker double-forks, and the grandchild calls setsid() and keeps writing to a log after the original process has exited. On macOS 15.6.1 the descendant shows parent pid 1 and its own session, and it keeps writing until it finishes on its own: // worker: fork twice, let the intermediate processes exit if (fork() > 0) _exit(0); if (fork() > 0) _exit(0); setsid(); // leaves the original process group and session for (int i = 0; i < 8; i++) { // append "tick i pid ppid" to the log, ppid is now 1 usleep(200000); }Build with cc -Wall -Wextra -Werror -o DescendantOutlivesParent main.c and run ./DescendantOutlivesParent /tmp/descendant-log /tmp/descendant-ready. Questions: Is there a supported mechanism that ties every descendant of a process started by an XPC service, including ones that called setsid(), to the lifetime of that service, so that they are terminated when the service exits or crashes? If the service is sandboxed, does sandbox inheritance (children inherit the parent's sandbox) also give us a way to find or terminate those descendants, or does it only restrict what they can do? If neither, what does Apple recommend for running an untrusted command-line tool where leftover descendants must be ruled out? For example, is a separate launchd job per run, a different process-management API, or Endpoint Security authorization the intended route? Can that mechanism be combined with per-run file access (one input folder and one scratch folder per run), without giving the tool a shared container or network access? We would rather learn that a guarantee is not available than build on an assumption, so a "this is not supported" answer is also useful to us. 2. Reply to the DTS email Reply to Apple's case email (keep the subject) after the post is live: Case-ID: 22893354 Hello, Thank you. I posted the question on the Developer Forums here: <FORUM POST URL> The sample project is attached to the post. There is nothing private in it. Best regards, <NAME>
1
0
233
Oct ’26
Supported complete lifetime boundary for a macOS native worker subtree
We are assessing a native macOS worker supervised by an independently protected background service. Our current Mac's system-version file reports macOS 27.0.1 (26A434), and the installed SDK declares es_new_descendants_client for macOS 27. No Endpoint Security client or experimental confinement has been activated. We need a supported public way to stop a job and verify that its controlled execution has ceased, even if workers fork, exec, call setsid/setpgid, are reparented, or their immediate supervisor crashes. Admission must remain closed until reconciliation after a failure. Delegation to outside services must either be denied or have its own enforceable ownership and stop contract. Does Apple provide a public API/configuration that establishes this hereditary ownership and complete termination boundary? In particular, does a descendants ES client's scope retain processes across parent exit/reparenting, and what supported operation can quiesce/terminate that entire owned population without a fork-versus-enumeration race? What remains enforced if that client dies or is deleted? We understand that fail-closed AUTH deadlines and es_sync_client alone do not establish this property. Please identify the supported interface, OS versions, entitlement/privilege requirements, relevant failure semantics and independently observable completion condition, or confirm the limits of this proposed combination. We are asking about the public contract, not private implementation details or a guarantee during kernel failure.
1
0
188
Oct ’26
Endpoint Security authorization guarantees after client failure or disconnection
I’m reviewing a hypothetical macOS worker controlled through Endpoint Security authorization events. The design uses synthetic fixtures only; no Endpoint Security client has been created for this candidate. The worker’s prohibited operations must be denied before access occurs and remain denied throughout its lifetime. The documentation for es_set_deadline_miss_mode describes missed authorization deadlines and queue overflow. I need clarification on the separate case where the authorization client disappears. For both es_new_client and es_new_descendants_client: What verdict applies to an outstanding AUTH request if the client crashes, disconnects or is deleted before responding? What governs subsequent operations after the last matching client disappears or unsubscribes? Does ES_DEADLINE_MISS_MODE_FAIL_CLOSED cover any of those situations, or only missed deadlines and queue overflow? Is there a supported mechanism that preserves the required denials for an already-running worker throughout client loss and recovery? Which guarantees differ between the two client types or across released macOS versions? Please distinguish pending requests from later requests. A watchdog that eventually terminates the worker would not establish denial during the intervening period. I’m seeking a public, versioned contract or clarification of the specific limitation requiring another independent enforcement mechanism. Relevant references: Deadline miss policy Client deletion Descendant-scoped client No real credentials, backups or customer data are involved. This request does not seek entitlement grants, permission changes or access to private APIs.
2
0
173
Oct ’26
macOS: supported process-tree lifetime boundary after supervisor loss
I am building Ouroboros (ouro-jail), a contained developer workload runner. Before advertising native macOS support, I need a supported lifetime boundary that covers ordinary fork/spawn/exec descendants, including detached sessions and double-fork daemons. Execution must stay contained when every userspace custodian dies, rather than relying on a surviving process to enumerate and kill descendants. Does macOS provide a supported facility that can: Establish an immutable workload scope before its first instruction and atomically inherit membership through fork/spawn/exec, without modifying the workload or preventing ordinary Node, shell and Git subprocess behavior? Stop or terminate every member after loss of the final control owner, with enforcement retained in the kernel and no userspace callback required? Handle concurrent creation during teardown and expose a verifiable final drain, using stable process identities rather than PID-only scans? Development evidence on macOS 27.0 build 26A428, XNU 13432.1.9 (isolated VM, SIP already disabled in the guest; this is development evidence, not normal-SIP qualification): Descendant-scoped Endpoint Security clients observe the tested subtree. Reciprocal custodians handle either client's loss, but killing both leaves all known members running. Uncached fail-closed AUTH_EXEC lets a survivor execute a new command after both clients disappear (200 reciprocal-custody trials). PT_ATTACHEXC gives kernel-enforced debugger-death cleanup for attached targets, but later fork/spawn children survive (80 debugger-lifetime trials). A locally installed, identity-protected Mach exception handler is inherited through the tested fork/spawn/exec paths. Owner death changes it to a dead handler without stopping normal execution; a child can clear it. Breakpoint controls confirm real kernel exception delivery (24 Mach-lifetime trials). Published XNU contains per-task fatal-port no-senders cleanup, but machdep.task_get_fatal_port is absent on this tested release kernel. I have not treated it as a supported application API. LaunchServices creates a real application coalition, and XPC service lifetime follows app death. However, all seven workload descendants survive, retain coalition membership and can execute a new command. Shared and private audit sessions both fail; eight-second follow-ups also retain all seven survivors. A temporary root launchd service restarts and reaps seven recorded processes after a crash, but does not restart a stopped custodian (native-service trials). I understand Endpoint Security entitlement is separate from a lifetime guarantee. Please clarify whether an approved descendant-scoped ES deployment can provide that owner-loss guarantee through a documented API, whether another supported facility is appropriate, or whether meeting this contract requires a VM boundary. Below are the relevant parts of a focused C command-line reproduction (192 lines total, Xcode 27.0, SDK 27.0, -Wall -Wextra -Werror, no signing or third-party libraries). The code ran in the isolated VM; the packaged Xcode project has only been build-checked. 1. The owner installs a protected exception handler on itself, then forks the workload. No cleanup callback follows. static const exception_mask_t masks = EXC_MASK_SYSCALL | EXC_MASK_MACH_SYSCALL | EXC_MASK_BREAKPOINT; static const exception_behavior_t behavior = EXCEPTION_IDENTITY_PROTECTED | MACH_EXCEPTION_CODES; mach_port_t channel = MACH_PORT_NULL; mach_port_options_t options = {.flags = MPO_EXCEPTION_PORT | MPO_INSERT_SEND_RIGHT}; kern_return_t rc = mach_port_construct(mach_task_self(), &options, 0, &channel); if (rc != KERN_SUCCESS) return 4; rc = task_set_exception_ports(mach_task_self(), masks, channel, behavior, THREAD_STATE_NONE); if (rc != KERN_SUCCESS) return 4; pid_t child = fork(); if (!child) { /* Ordinary receive rights are not inherited. Only the kernel's task * exception-handler state provides supervision of this child. */ _exit(payload(directory, mode, exe)); } 2. The workload detaches (double-fork shown; fork, setsid and posix_spawn SETPGROUP/SETSID also tested; a child can also clear the handler with task_set_exception_ports(..., MACH_PORT_NULL, ...)). child = fork(); if (!child) { if (strcmp(mode, "fork") && setsid() < 0) _exit(4); if (!strcmp(mode, "double-fork")) { pid_t second = fork(); if (second < 0) _exit(4); if (second) _exit(0); } child_work(directory, mode); } 3. Each member reads its inherited handler state and keeps running ordinary BSD syscalls and a Mach trap. kern_return_t rc = task_get_exception_ports(mach_task_self(), masks, observed, &count, ports, behaviors, flavors); /* port == MACH_PORT_DEAD -> dead_mask, valid send right -> live_mask */ for (;;) { if (write(fd, ".", 1) != 1) _exit(3); /* heartbeat file */ (void)getpid(); mach_port_t thread = mach_thread_self(); mach_port_deallocate(mach_task_self(), thread); usleep(10000); } Observed output (double-fork case, original VM run). Workload, before and after SIGKILL of the owner (pid 1472): {"kind":"exception_state","role":"root","phase":"before_owner_loss","rc":0,"live_mask":448,"dead_mask":0} {"kind":"exception_state","role":"late-child","phase":"before_owner_loss","rc":0,"live_mask":448,"dead_mask":0} {"kind":"exception_state","role":"root","phase":"after_owner_loss","rc":0,"live_mask":0,"dead_mask":448} {"kind":"exception_state","role":"late-child","phase":"after_owner_loss","rc":0,"live_mask":0,"dead_mask":448} After owner loss, both root (pid 1473) and the detached late-child (pid 1475, own session) were still alive under the same uniqueid/pidversion, reparented to launchd, with heartbeat files still growing. Across 21 owner-death trials in 7 modes, 39 known fixture processes survived and no case left the fixture empty. The 3 breakpoint controls (owner alive) confirmed real exception delivery. Expected contract: a documented kernel-owned boundary prevents continued execution by every inherited member after all control owners disappear, without enumerating descendants after the fact or requiring workload cooperation. I am asking which supported macOS API meets that contract, not asserting that exception ports promise it. Apple DTS asked me to start this thread (Case-ID: 22799543) and will review once I reply with the link. The full reproduction steps and environment details are in the attached text. forum-attachment-reproduction.txt
3
0
532
Oct ’26
Endpoint Security: pending AUTH_CREATE and new operations after the last client disappears
I am reviewing the supported Endpoint Security API contract for a design targeting macOS 27.2. I have not activated an Endpoint Security extension or reproduced this scenario. This is a question about documented API behavior. In “Build an Endpoint Security app” at WWDC20, Apple explains that Endpoint Security applies an implicit allow result when no clients are subscribed to an event’s AUTH variant. The current documentation for es_set_deadline_miss_mode describes handling missed authorization deadlines. It also documents denial when an AUTH message is dropped because the queue of a client configured with ES_DEADLINE_MISS_MODE_FAIL_CLOSED is full. Consider a single client created with es_new_client, subscribed to ES_EVENT_TYPE_AUTH_CREATE, and configured with ES_DEADLINE_MISS_MODE_FAIL_CLOSED. What supported behavior applies in these two situations? An AUTH_CREATE request has already been delivered and remains unanswered when the client crashes, disconnects, is destroyed with es_delete_client, or unsubscribes while remaining connected. How is that pending request resolved? Please distinguish these cases if their behavior differs. A new, otherwise permitted creation is attempted while no client is subscribed to AUTH_CREATE. Does the implicit-allow rule described at WWDC20 still apply on macOS 27.2, regardless of the previous client’s FAIL_CLOSED setting? We need to determine whether the design requires an independent control during the interval without a subscribed client. References to the supported contract, applicable versions, and conditions would be very helpful. References: https://developer.apple.com/videos/play/wwdc2020/10159/ https://developer.apple.com/documentation/endpointsecurity/es_set_deadline_miss_mode(_:_:) https://developer.apple.com/documentation/endpointsecurity/es_delete_client(_:) https://developer.apple.com/documentation/endpointsecurity/es_unsubscribe_all(_:)
Replies
2
Boosts
0
Views
148
Activity
14m
Can macOS tracing identify the process that received a specific iCloud Drive write request?
I’m investigating file-write attribution for iCloud Drive on an Apple silicon Mac running macOS 26.6.2. For a specified file, I’d like to correlate three pieces of information for the same operation: the process that initiated the request, the process that received it, and the process that performed the filesystem write. The receiver and the writer may be different processes. In a read-only review of existing logs, I could correlate several File Provider job events by item identifier. Those entries were logged by fileproviderd. I also checked the Endpoint Security XPC connection event, which exposes the service name and domain type. I haven’t found a way to use those records to identify the process that received an individual request, especially when it travels over an already-open XPC connection. Is there a supported macOS API or tracing workflow that can correlate a specific request to its receiving process and the corresponding file operation? If so, which fields should I use to join the events, and what permissions are required? If the available tools can attribute the filesystem write, how can I tell whether the receiver of the original request is also observable?
Replies
1
Boosts
0
Views
33
Activity
4h
Can macOS report all pending, active, and retrying iCloud Drive operations for a specific file?
I’m building a read-only diagnostic for iCloud Drive on an Apple silicon Mac running macOS 26.6.2. Given a local file URL or a File Provider item identifier, I’d like to determine whether any sync operations are queued, running, or waiting to retry for that file. From a normal user session, I can resolve an iCloud Drive file to its File Provider item and domain identifiers. However, calling NSFileProviderManager.getDomainsWithCompletionHandler returns NSFileProviderErrorDomain error -2001 (providerNotFound). I can also correlate some job registration and completion events in the unified log by item identifier, but I haven’t established whether those logs cover every operation for the item. Is there a supported API or diagnostic tool that returns a complete point-in-time list of queued, running, and retrying operations for a specified iCloud Drive file? If so, what permissions are required, and how can the caller distinguish a complete result with zero operations from an incomplete, delayed, or unavailable result? If a complete list is unavailable, what per-file state can a third-party diagnostic reliably report?
Replies
1
Boosts
0
Views
31
Activity
4h
Does es_sync_client completion exclude a dropped final notification?
This is a public API contract question about macOS 27 EndpointSecurity, not a reported bug, observed loss, or tested reproducer. We need to distinguish draining messages admitted to a client queue from establishing that every relevant generated notification was delivered, including the final one. For this hypothetical case, assume one exact, nonnull client instance remains live in the same epoch throughout the request and callback. Its required subscriptions and unmuted scope have been verified. The sync call is made outside its ES handler; no client deletion, replacement, or cancellation occurs. A null-client immediate callback or a callback caused by destruction would not qualify. Also assume an ordered application writer has committed every record delivered to it; that receipt does not establish kernel completeness. Consider the following schematic sequence: A, the last numbered message, is received → an in-scope NOTIFY B may be generated and dropped → es_sync_client returns success and its callback completes → no subsequent numbered message is received. B represents a notification associated with an operation intended to precede the synchronization cut. Whether that operation's completion establishes B's enqueue position relative to the marker is part of the contract question, not an assumed scheduling guarantee. We understand the documented synchronous-enqueue relationship for completed syscalls. The sequence counters compare received messages, while WWDC20 also describes queue-full drops. We are not asserting that this hypothetical history occurs on any particular release. For an operation with the required pre-marker ordering established, does successful sync completion on the live client exclude a generated-but-dropped B, rather than only confirm processing of messages actually ahead of the marker in the queue? If it does not, is there a supported terminal sequence watermark, drop result, or equivalent interface that can establish loss-free delivery for that finite cut without waiting for another numbered notification? Which public contract specifies the required causal-ordering and client-lifecycle conditions, applicable macOS/SDK versions, and loss semantics—or, if this stronger guarantee is unavailable publicly, can you confirm the supported boundary? This question does not request global quiescence, termination of all descendants, private implementation details, or a workaround that weakens identity checks. References: es_sync_client global_seq_num seq_num WWDC20: Build an Endpoint Security app, 37:27
Replies
1
Boosts
0
Views
123
Activity
20h
Detecting or restricting ScreenCaptureKit capture of a specific app's windows
Hi, I'm exploring macOS options to protect the windows of selected apps from being screen-captured or recorded by other apps (enterprise Macs, managed via MDM). Is there a supported API or Endpoint Security event that tells when a process starts a screen capture or recording (ScreenCaptureKit), and whether it captures a display or a single window? Is there a supported way, for example via MDM, to prevent other apps from capturing a specific app's windows? NSWindow.sharingType = .none no longer seems to exclude a window from ScreenCaptureKit on macOS 15 and later. Is this expected, and is there an alternative? Tested on macOS 26.3.1 (Apple silicon). Thanks.
Replies
4
Boosts
0
Views
170
Activity
3d
Endpoint Security Entitlement Still Pending After 62 Days
I am developing AI Device Guard, a macOS security application designed to protect users against unauthorized activity initiated by AI-powered software and autonomous agents. I submitted my Endpoint Security Client entitlement request on September 30, 2026. As of December 1, 2026, the Apple Developer portal shows: Endpoint Security: Submitted Endpoint Security (development): Assigned Time outstanding: 62 days I have contacted Apple Developer Support multiple times and formally requested escalation, but have not received a substantive response. The outstanding entitlement is preventing me from completing production-level security enforcement, validation and distribution. Has anyone experienced a similar delay? Could an Apple engineer advise on the appropriate escalation process or assist in determining whether additional information is required? I can provide the original entitlement request ID and support case number privately to an Apple representative. Thank you for any assistance.
Replies
0
Boosts
0
Views
31
Activity
3d
Supported per-operation fresh administrator authentication in macOS
I am developing a macOS security application that requires strictly controlled, attended administrative operations through a protected privileged helper. Security requirements Fresh native administrator authentication for every privileged operation. Explicit confirmation of the exact operation. Cryptographic binding between the operation, authorization and transaction. Durable single-use authorization and replay protection. No collection or storage of administrator passwords by the application. No reliance on previously cached administrative credentials. Testing performed In an isolated Apple silicon macOS virtual machine, we registered a temporary custom Authorization Services right with the following policy: class = user group = admin authenticate-user = true shared = false timeout = 0 allow-root = false session-owner = false Noninteractive authorization was correctly denied with OSStatus -60007. Interactive cancellation returned OSStatus -60006. However, an interactive authorization dialog did not display the operation-specific token supplied through kAuthorizationEnvironmentPrompt. Consequently, we could not establish that the administrator had been presented with the exact operation being authorized. We also reviewed the public Endpoint Security SDK declarations for authentication, authorization petition and authorization judgement events. Although audit tokens identify participating processes, we could not identify a documented per-evaluation causal identifier linking these events. The temporary authorization right was subsequently removed. Technical questions Does macOS provide a supported public API that guarantees fresh administrator authentication for each individual evaluation of a custom authorization right? Can a trusted privileged helper independently verify the freshness of that authentication, the authenticated administrator's identity and its association with a specific authorization evaluation? Is there a documented mechanism for causally correlating Endpoint Security authentication, authorization petition and authorization judgement events, including concurrent requests and event loss? Can AuthorizationCopyInfo, LocalAuthentication or a supported authorization plug-in provide the required evidence without the application collecting administrator credentials? What supported architecture does Apple recommend for cryptographically binding fresh native administrator authentication to a specific, single-use privileged operation? We are seeking a documented and supported security architecture rather than a workaround or a reduction of macOS security protections. If these guarantees are not currently available through public APIs, confirmation of that limitation would also be extremely helpful. Thank you for your technical guidance.
Replies
1
Boosts
0
Views
395
Activity
3d
Full Disk Access on macOS 27.3
I'm looking into the changes being implemented and I find this way of handling by Apple on short notice problematic. Now our customers (those that don't have MDM) will have to jump through hoops to enable FDA for our product, a security product that also uses Endpoint Security. We already have the entitlement for endpoint security, which requires FDA in order to work, so why make it so difficult instead of just allowing FDA for apps that have this entitlement? Why only backup applications are exempted?
Replies
3
Boosts
0
Views
233
Activity
4d
Can macOS verify a worker’s effective sandbox policy before it runs?
I’m building a local app on an Apple silicon Mac. Before a worker or any of its child processes can run, I need to verify the worker’s effective filesystem and network restrictions, including inherited restrictions. I need to allow that same pending launch only if the policy matches, and deny it if verification fails or times out. I reviewed Apple’s App Sandbox guidance and the Endpoint Security documentation for exec authorization and entitlement metadata. I haven’t found documentation showing that these expose the complete effective policy for the pending launch. Is there a supported public macOS API that provides this guarantee? If so, which API and macOS versions support it? If not, is this outside what the public APIs can verify?
Replies
1
Boosts
0
Views
248
Activity
2w
AuthorizationRightSet called from an endpoint security extension fails with -60008
The Mac has managed profiles installed giving the endpoint security process full disk access. Most Macs do not get this error and AuthorizationRightSet works properly. However, one Mac gets the -60008 error and I can't determine the cause. Should an endpoint security extension be able to call AuthorizationRightSet?
Replies
1
Boosts
0
Views
105
Activity
2w
Supported vnode metadata access after same-UID libproc queries return EPERM
We need a documented interface/access contract for a test supervisor that requires a bounded, process-birth-bound census of every process with its effective UID and every current vnode descriptor of those processes. Coverage includes ambient same-UID processes and descriptors opened before observation starts. The census needs vnode identity, type, ownership, mode, link count and open flags. Unavailable metadata is a refusal; we cannot treat EPERM as absence or exempt a process or descriptor. This is a cooperative same-user lifetime-containment check. We do not require file contents or an atomic global snapshot. Environment of the retained observation: Apple Silicon, macOS 27.3 (26C5035r), Darwin 27.3.0; Xcode 27.0 (27A5194q), macOS 27.0 SDK. The subject was the system LaunchServices process /usr/libexec/lsd. Caller real/effective UID matched the subject's UID/RUID/SVUID. Before/after process identity, version, start time, credentials and executable-path samples matched. PROC_PIDLISTFDS returned 32 bytes and listed FD 3 as PROX_FDTYPE_VNODE. The following call shape returned 0 bytes with errno == EPERM (1), with 176 bytes expected in that environment: struct vnode_fdinfo info = {0}; errno = 0; int count = proc_pidfdinfo(pid, fd, PROC_PIDFDVNODEINFO, &info, sizeof(info)); int saved_errno = errno;Errno was cleared before and saved immediately after the call. Credentials were not modified. The matching process bracket does not establish an FD-to-path association or a specific protection category. In particular, we have not established a Data Vault subtype. Questions: Is there a supported public interface or provisionable entitlement that supplies the required metadata for every current same-UID vnode descriptor, including descriptors whose metadata is protected internally by macOS? If Endpoint Security is the supported route, which documented API supplies a complete current FD inventory and vnode mapping, including already-open descriptors and ambient same-UID processes? A solution limited to descendants of the client does not cover this requirement. If supported interfaces cannot guarantee that coverage, could you clarify the limitation? Is there a supported diagnostic that identifies the protection category responsible for this metadata denial without inspecting private policy state? I have considered the "On File System Permissions" guidance, including its mandatory-access-control and Endpoint Security discussion: https://developer.apple.com/forums/thread/678819 This post describes a retained observation, not a new reproduction or qualification result. All retained results remain UNPROVED. A focused SDK/libproc Xcode example was previously built for arm64 and x86_64 but was not run; it illustrates the call sequence and a BSD start/credential bracket, not complete kernel birth binding or the required census. It does not guarantee reproduction on another system. The sanitized supporting record and example are already attached to the private DTS request that directed me to the forums. Please advise the supported interface/access contract, or its limitation, and any further diagnostic scope needed.
Replies
1
Boosts
0
Views
122
Activity
2w
Supported SIP-on evidence for descriptor 0 at child creation/exec on macOS 27.0.1 (26A434), arm64
We need one written, reviewable capability response for the recorded system configuration: macOS 27.0.1, build 26A434; Darwin 27.0.0; xnu-13432.1.9~1/RELEASE_ARM64_T8103; arm64. These are retained host observations, not a new claim of kernel/source equivalence. The target is an application-owned non-platform Conda CPython process using its original subprocess.run/Popen calls with stdin/input omitted. We must keep System Integrity Protection enabled, preserve the original interpreter and global Python settings, and preserve executable, argv, environment, Path objects, stdin choices, timeouts, return/exception behavior and cleanup. We cannot replace the launch with a debugger-owned PTY, DEVNULL, wrapper, or changed timeout. A single harmless-target capability attempt has already been consumed. Authentication succeeded; the target's process credentials were uid/euid 501, gid/egid 20, with process group vector [20]. In that exact attempt DTrace reported at line 11: "probe description syscall:::entry does not match any probes. System Integrity Protection is on". No trace records or begin/end receipts were obtained; the target gate stayed closed and both recorded children were reaped during bounded cleanup. The diagnostic script path is intentionally omitted here; the original local raw text is preserved. We are not attributing every possible native-observation limitation solely to SIP, and we will not rerun that attempt. The single requested deliverable is CAPABILITY-RESPONSE.json (or one equivalent signed/versioned document), answering whether a named, supported mechanism on this exact configuration provides EITHER: A. A synchronous record of each original child's descriptor-0 underlying object at the accepted fork/exec boundary, including type, object/device identity and descriptor/access flags; OR B. A complete no-transient-change proof from an independently accepted descriptor-0 identity anchor over the entire original interval, covering every relevant thread and child from birth without a registration race. Please include these sections in the ONE response: disposition: SUPPORTED / UNSUPPORTED / NOT_ESTABLISHED; route A or B; responding organization/product, supported API/tool and exact version; links to public contract or a reviewable vendor coverage statement applicable to this OS/build/architecture. permissions: exact privileges, supported signing/entitlement eligibility and installation requirements; explicit statement that SIP and global Python stay unchanged. Do not assume administrative privilege alone gives kernel visibility. boundary_and_scope: how parent/child stable identities, fork/exec phase, all relevant threads and descendants, birth-registration ordering, PID reuse and cross-CPU ordering are handled; when capture starts and stops relative to the original anchor/call. coverage_and_loss: the exact guaranteed events/object fields; proof or documented guarantee of coverage; missing-event/drop/buffer-overflow/sequence-restart/error detection; the independent acceptance rule must reject any unknown interval or loss. For route B, enumerate applicable descriptor writers including direct/noncancel/guarded syscalls, open/close/dup/fcntl, received descriptors/fileports, spawn/exec file actions and close-on-exec, plus concurrency/cancellation/signal/startup paths. A short illustrative syscall list is insufficient. raw_contract: a minimal raw-record schema or already existing reference example, with observed fields distinguished from derived fields; stable process identity, phase, timestamps/sequence domain, descriptor/object identity, raw returns/errno, and coverage/error status. A source-version match or pathname alone is not an object-identity witness. preservation: how original call arguments, stdin/input omission, results/exceptions, original timeouts, original PID/wait/reap/raw streams and cleanup remain intact, and any observer effects. We cannot add waits, kills, reads or retries to fill missing original evidence. prospective_validation: a finite, independently reviewable validation plan only, with success criteria and false-acceptance controls for missing records, descriptor replacement/ABA, unobserved early children and stream loss. No launch, sudo command, new probe iteration or installation is authorized by this request. If no supported mechanism satisfies either route, please say UNSUPPORTED and name the missing public capability; if applicability is unknown, say NOT_ESTABLISHED. Do not substitute a generic follow-fork setting, a late process/fd snapshot, an EndpointSecurity descriptor subset/type list, successful compilation, source version numbers, or a recommendation to disable SIP/change stdin. A positive written response permits only independent design/source/coverage review. It does not prove our actual descriptor-0 chain and grants no project verification credit. Only after pre-review passes could a separately bound, new finite observation request be considered. No historical missing data will be reconstructed or old completed validations repeated. This is one specific supported-API/capability question, not a request for Apple to develop our collector or disclose private implementation. No repository sources, account secrets, credentials, private paths or runtime databases are attached. No existing observation tool or build materials are requested from our end user.
Replies
1
Boosts
0
Views
165
Activity
4w
How to get file size before and after write operations using Endpoint Security?
Hello, I am working on an audit of file operations for a DLP agent. I am trying to implement this mechanism using Endpoint Security. One of the customer's requirements is that write event reports must provide information about the file size both before and after the write operation. The challenge is that the ES_EVENT_TYPE_NOTIFY_WRITE event does not provide information about the changes, and in the stat structure, I see the file's stat prior to the write event. I tried to implement a mechanism based on tracking the sequence of events (open -> write -> close), but it seems macOS does not guarantee such a sequence, as the agent receives ES_EVENT_TYPE_NOTIFY_CLOSE earlier than ES_EVENT_TYPE_NOTIFY_OPEN. Unfortunately, Auth events cannot be used due to no guarantee the DLP agent is the only ES client. Is there any way within the Endpoint Security Framework to guarantee the sequence of NOTIFY events? Are there any other supported (public) APIs or methods besides Endpoint Security to track file system changes? As far as I know, ktrace (which powers fs_usage) is a private framework. Thank you in advance!
Replies
6
Boosts
0
Views
184
Activity
4w
Can macOS enforce fail-closed AUTH_EXEC authorization if the Endpoint Security client fails?
Hello Apple Developer Community, I am designing a security-isolated Swift compilation workflow on Apple silicon macOS. The goal is to execute a compiler only within an explicitly authorized environment, without granting access to unrelated project files or privileged operations. I am investigating the Endpoint Security framework, specifically AUTH_EXEC, for enforcing execution authorization. Security requirements: Allow only explicitly approved compiler and linker executables. Validate executable identity and command-line arguments, including child process execution. Prevent unauthorized execution even if the authorization component crashes, disconnects, or fails to respond before its deadline. Ensure that restrictions cannot be bypassed by launching a different executable or using unexpected child process arguments. My understanding: Endpoint Security provides execution authorization events and APIs for inspecting process arguments. However, Apple's documentation indicates that missing an authorization deadline may result in implicit authorization. This raises an important question about enforcing a strictly fail-closed policy. Questions: Is there a publicly supported macOS mechanism that guarantees unauthorized process execution remains blocked when an Endpoint Security client becomes unavailable or misses its authorization deadline? Can Endpoint Security be combined with App Sandbox, launch constraints, or another supported security mechanism to provide this guarantee? Is there a supported way to enforce restrictions on child process executable identity and command-line arguments before execution? If these guarantees are not available, what isolation architecture would Apple recommend for executing an untrusted or potentially misbehaving compiler? Environment: Apple silicon Mac macOS 26.x Apple Swift 6.3.x Xcode and macOS SDK Local, non-privileged Swift compilation This is an architectural design question. No Endpoint Security system extension or privileged helper has been deployed. I would appreciate guidance on publicly supported APIs, security guarantees, and any relevant Apple documentation. Thank you!
Replies
0
Boosts
0
Views
258
Activity
Nov ’26
Endpoint Security authorization after client loss: pending requests and subsequent namespace operations
I am evaluating a hypothetical file collector that uses fixed approved directory roots. Its requirement includes rename-after-open: if another process moves an opened file or an ancestor outside the approved namespace, the collector must not continue accessing it there. This concerns input reads, directory enumeration, preview reacquisition, and writes to exclusively created output files. Retaining a previously approved descriptor or detecting a move after access does not meet the requirement. I am considering whether Endpoint Security can prevent the relevant namespace mutations before they occur for the complete access interval. No Endpoint Security client has been created or exercised for this candidate. This is a request for a documented, versioned contract, not permission to deploy a client, obtain an entitlement, or change the system. The deadline-mode documentation describes the response to an unanswered authorization within its deadline. The mode values describe deny without killing the client, allow without killing the client, and killing the client as the default. The setter documentation also describes denial of a queue-full AUTH drop under FAIL_CLOSED. I have not found, in the specific pages listed below, an explicit contract for the separate case of client loss. I am not assuming that deadline policy covers disappearance of a client. Could you clarify the following? Pending authorization at client loss For a relevant authorization such as ES_EVENT_TYPE_AUTH_RENAME or ES_EVENT_TYPE_AUTH_UNLINK that is already pending, what exact verdict applies if the matching client crashes, disconnects, is deleted with es_delete_client, or unsubscribes before responding? Please distinguish each case, including when it was the last matching client and when other matching clients remain. Does a configured FAIL_CLOSED deadline policy remain attached to that pending request after client loss? Operations after the last matching client is gone What controls a later rename, reparenting, exchange, unlink, or other relevant namespace mutation after the last matching client has disappeared or unsubscribed? Is there a supported policy that remains effective independently of that client's lifetime? Please distinguish new operations from an authorization that was already pending, including cached decisions and any interval before a replacement client is ready. A supported complete protection interval Is there a supported way, through Endpoint Security or another supported kernel-enforced mechanism, to keep the necessary namespace mutations denied from before the collector's first access until its final read/write ends, despite authorization-client loss, partial setup, or owner death? The mutating actor may be outside the collector's process subtree. A later watchdog termination, restart, or notification of a completed operation would not establish denial during the intervening interval. If protection must end before that interval is complete, please identify the exact limitation. Client types and failure cases Which guarantees differ between es_new_client and es_new_descendants_client? Beyond the unanswered-deadline and full-queue cases, does any deadline mode affect the cases in questions 1 and 2? Please identify any self-process, muting, caching, scope, or actor limitations that prevent the proposed all-relevant-mutator coverage. I am not assuming a descendant-scoped client can authorize operations by unrelated processes. Versioned support and prerequisites For any supported contract, please cite the public documentation or other authoritative reference, applicable released macOS versions, exact API and deployment configuration, and required entitlements, privilege, consent, or system-extension conditions. API introduction metadata alone is not being treated as evidence about an installed target, and an upgrade or privilege change is not assumed. If no public supported mechanism provides the requested interval, an explicit statement of the missing guarantee or required independent enforcement boundary would be useful. Public references reviewed https://developer.apple.com/documentation/endpointsecurity/es_set_deadline_miss_mode(::) https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_t https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_fail_closed https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_fail_open https://developer.apple.com/documentation/endpointsecurity/es_deadline_miss_mode_kill https://developer.apple.com/documentation/endpointsecurity/client https://developer.apple.com/documentation/endpointsecurity/es_client_t https://developer.apple.com/documentation/endpointsecurity/es_new_client(::) https://developer.apple.com/documentation/endpointsecurity/es_new_descendants_client(::) https://developer.apple.com/documentation/endpointsecurity/es_delete_client(:) https://developer.apple.com/documentation/endpointsecurity/es_unsubscribe_all(:) The scoped document reviews did not establish the two client-loss cases above; this is not a claim that every relevant Apple document or mechanism has been exhausted. No real data, credentials, private artifacts, logs, or host identifiers are needed for this clarification.
Replies
3
Boosts
0
Views
398
Activity
Oct ’26
Supported macOS containment for a sandboxed worker after controller failure.
Subject: Supported macOS containment for a sandboxed worker after controller failure I'm investigating an Apple Silicon/macOS architecture in which an untrusted, signed, sandboxed worker must be independently containable by a separate trusted supervisor. The worker needs only a narrow authenticated communication channel. It requires no direct network access, external operational credentials, privileged file access or authority to launch helpers. I understand that App Sandbox does not inherently prevent child-process creation, and that RLIMIT_NPROC alone does not prevent every form of execution delegation. Could you clarify: Is there a public, supported macOS mechanism to deny all worker-originated subprocess creation and execution delegation at launch, while retaining one restricted communication channel? Alternatively, is there a supported mechanism for a surviving supervisor to identify, terminate and positively verify the complete execution domain of a worker, including any descendants, after its controller crashes or is suspended? What guarantees and limitations apply to stable identity, process exit, automatic relaunch and loss of the supervisor? I'm specifically seeking supported operating-system guarantees, not private sandbox profiles, polling, heartbeat inference or best-effort process-tree enumeration. The goal is to determine whether a bounded synthetic containment experiment is technically justified. No production implementation has been attempted.
Replies
5
Boosts
0
Views
236
Activity
Oct ’26
Keeping every descendant of a sandboxed XPC service’s worker inside its lifetime (fork, double-fork, setsid)
Apple DTS case 22893354: forum post and reply Apple asked for the question as a Developer Forums post, then a reply to the case email with the post URL. Nothing below has been posted or sent. 1. Forum post Post at https://developer.apple.com/forums/ (signed in, "Ask a question"). Suggested tags: XPC, App Sandbox, Endpoint Security Attach: fixtures/egress_guard/hp04/apple-descendant-sample/main.c, renamed to main.txt if the forum refuses .c. Title Keeping every descendant of a sandboxed XPC service's worker inside its lifetime (fork, double-fork, setsid) Body We are designing a macOS app that runs an unmodified third-party command-line tool for one task at a time. The plan is an app-bundled, sandboxed XPC service that launches the tool as a child process. The tool is not ours, so we have to assume it may fork without exec, double-fork, and call setsid(). For each run we need one guarantee: after the run ends, every process the tool created has stopped. "Ends" includes the XPC service crashing and the host app crashing, not only a clean cancel. If we cannot prove that, we cannot report the run as finished. What we have looked at so far: Killing the process group. A child that calls setsid() is no longer in the group. launchd's process-group cleanup for the job. As we read launchd.plist(5), that also covers the process group only. Tracking pids from fork and exit notifications, including Endpoint Security. Notifications can be dropped, and pids can be reused, so a list rebuilt from events is not proof that nothing is left. The attached sample shows the process shape without any sandbox or XPC. It starts a worker, the worker double-forks, and the grandchild calls setsid() and keeps writing to a log after the original process has exited. On macOS 15.6.1 the descendant shows parent pid 1 and its own session, and it keeps writing until it finishes on its own: // worker: fork twice, let the intermediate processes exit if (fork() > 0) _exit(0); if (fork() > 0) _exit(0); setsid(); // leaves the original process group and session for (int i = 0; i < 8; i++) { // append "tick i pid ppid" to the log, ppid is now 1 usleep(200000); }Build with cc -Wall -Wextra -Werror -o DescendantOutlivesParent main.c and run ./DescendantOutlivesParent /tmp/descendant-log /tmp/descendant-ready. Questions: Is there a supported mechanism that ties every descendant of a process started by an XPC service, including ones that called setsid(), to the lifetime of that service, so that they are terminated when the service exits or crashes? If the service is sandboxed, does sandbox inheritance (children inherit the parent's sandbox) also give us a way to find or terminate those descendants, or does it only restrict what they can do? If neither, what does Apple recommend for running an untrusted command-line tool where leftover descendants must be ruled out? For example, is a separate launchd job per run, a different process-management API, or Endpoint Security authorization the intended route? Can that mechanism be combined with per-run file access (one input folder and one scratch folder per run), without giving the tool a shared container or network access? We would rather learn that a guarantee is not available than build on an assumption, so a "this is not supported" answer is also useful to us. 2. Reply to the DTS email Reply to Apple's case email (keep the subject) after the post is live: Case-ID: 22893354 Hello, Thank you. I posted the question on the Developer Forums here: <FORUM POST URL> The sample project is attached to the post. There is nothing private in it. Best regards, <NAME>
Replies
1
Boosts
0
Views
233
Activity
Oct ’26
Supported complete lifetime boundary for a macOS native worker subtree
We are assessing a native macOS worker supervised by an independently protected background service. Our current Mac's system-version file reports macOS 27.0.1 (26A434), and the installed SDK declares es_new_descendants_client for macOS 27. No Endpoint Security client or experimental confinement has been activated. We need a supported public way to stop a job and verify that its controlled execution has ceased, even if workers fork, exec, call setsid/setpgid, are reparented, or their immediate supervisor crashes. Admission must remain closed until reconciliation after a failure. Delegation to outside services must either be denied or have its own enforceable ownership and stop contract. Does Apple provide a public API/configuration that establishes this hereditary ownership and complete termination boundary? In particular, does a descendants ES client's scope retain processes across parent exit/reparenting, and what supported operation can quiesce/terminate that entire owned population without a fork-versus-enumeration race? What remains enforced if that client dies or is deleted? We understand that fail-closed AUTH deadlines and es_sync_client alone do not establish this property. Please identify the supported interface, OS versions, entitlement/privilege requirements, relevant failure semantics and independently observable completion condition, or confirm the limits of this proposed combination. We are asking about the public contract, not private implementation details or a guarantee during kernel failure.
Replies
1
Boosts
0
Views
188
Activity
Oct ’26
Endpoint Security authorization guarantees after client failure or disconnection
I’m reviewing a hypothetical macOS worker controlled through Endpoint Security authorization events. The design uses synthetic fixtures only; no Endpoint Security client has been created for this candidate. The worker’s prohibited operations must be denied before access occurs and remain denied throughout its lifetime. The documentation for es_set_deadline_miss_mode describes missed authorization deadlines and queue overflow. I need clarification on the separate case where the authorization client disappears. For both es_new_client and es_new_descendants_client: What verdict applies to an outstanding AUTH request if the client crashes, disconnects or is deleted before responding? What governs subsequent operations after the last matching client disappears or unsubscribes? Does ES_DEADLINE_MISS_MODE_FAIL_CLOSED cover any of those situations, or only missed deadlines and queue overflow? Is there a supported mechanism that preserves the required denials for an already-running worker throughout client loss and recovery? Which guarantees differ between the two client types or across released macOS versions? Please distinguish pending requests from later requests. A watchdog that eventually terminates the worker would not establish denial during the intervening period. I’m seeking a public, versioned contract or clarification of the specific limitation requiring another independent enforcement mechanism. Relevant references: Deadline miss policy Client deletion Descendant-scoped client No real credentials, backups or customer data are involved. This request does not seek entitlement grants, permission changes or access to private APIs.
Replies
2
Boosts
0
Views
173
Activity
Oct ’26
macOS: supported process-tree lifetime boundary after supervisor loss
I am building Ouroboros (ouro-jail), a contained developer workload runner. Before advertising native macOS support, I need a supported lifetime boundary that covers ordinary fork/spawn/exec descendants, including detached sessions and double-fork daemons. Execution must stay contained when every userspace custodian dies, rather than relying on a surviving process to enumerate and kill descendants. Does macOS provide a supported facility that can: Establish an immutable workload scope before its first instruction and atomically inherit membership through fork/spawn/exec, without modifying the workload or preventing ordinary Node, shell and Git subprocess behavior? Stop or terminate every member after loss of the final control owner, with enforcement retained in the kernel and no userspace callback required? Handle concurrent creation during teardown and expose a verifiable final drain, using stable process identities rather than PID-only scans? Development evidence on macOS 27.0 build 26A428, XNU 13432.1.9 (isolated VM, SIP already disabled in the guest; this is development evidence, not normal-SIP qualification): Descendant-scoped Endpoint Security clients observe the tested subtree. Reciprocal custodians handle either client's loss, but killing both leaves all known members running. Uncached fail-closed AUTH_EXEC lets a survivor execute a new command after both clients disappear (200 reciprocal-custody trials). PT_ATTACHEXC gives kernel-enforced debugger-death cleanup for attached targets, but later fork/spawn children survive (80 debugger-lifetime trials). A locally installed, identity-protected Mach exception handler is inherited through the tested fork/spawn/exec paths. Owner death changes it to a dead handler without stopping normal execution; a child can clear it. Breakpoint controls confirm real kernel exception delivery (24 Mach-lifetime trials). Published XNU contains per-task fatal-port no-senders cleanup, but machdep.task_get_fatal_port is absent on this tested release kernel. I have not treated it as a supported application API. LaunchServices creates a real application coalition, and XPC service lifetime follows app death. However, all seven workload descendants survive, retain coalition membership and can execute a new command. Shared and private audit sessions both fail; eight-second follow-ups also retain all seven survivors. A temporary root launchd service restarts and reaps seven recorded processes after a crash, but does not restart a stopped custodian (native-service trials). I understand Endpoint Security entitlement is separate from a lifetime guarantee. Please clarify whether an approved descendant-scoped ES deployment can provide that owner-loss guarantee through a documented API, whether another supported facility is appropriate, or whether meeting this contract requires a VM boundary. Below are the relevant parts of a focused C command-line reproduction (192 lines total, Xcode 27.0, SDK 27.0, -Wall -Wextra -Werror, no signing or third-party libraries). The code ran in the isolated VM; the packaged Xcode project has only been build-checked. 1. The owner installs a protected exception handler on itself, then forks the workload. No cleanup callback follows. static const exception_mask_t masks = EXC_MASK_SYSCALL | EXC_MASK_MACH_SYSCALL | EXC_MASK_BREAKPOINT; static const exception_behavior_t behavior = EXCEPTION_IDENTITY_PROTECTED | MACH_EXCEPTION_CODES; mach_port_t channel = MACH_PORT_NULL; mach_port_options_t options = {.flags = MPO_EXCEPTION_PORT | MPO_INSERT_SEND_RIGHT}; kern_return_t rc = mach_port_construct(mach_task_self(), &options, 0, &channel); if (rc != KERN_SUCCESS) return 4; rc = task_set_exception_ports(mach_task_self(), masks, channel, behavior, THREAD_STATE_NONE); if (rc != KERN_SUCCESS) return 4; pid_t child = fork(); if (!child) { /* Ordinary receive rights are not inherited. Only the kernel's task * exception-handler state provides supervision of this child. */ _exit(payload(directory, mode, exe)); } 2. The workload detaches (double-fork shown; fork, setsid and posix_spawn SETPGROUP/SETSID also tested; a child can also clear the handler with task_set_exception_ports(..., MACH_PORT_NULL, ...)). child = fork(); if (!child) { if (strcmp(mode, "fork") && setsid() < 0) _exit(4); if (!strcmp(mode, "double-fork")) { pid_t second = fork(); if (second < 0) _exit(4); if (second) _exit(0); } child_work(directory, mode); } 3. Each member reads its inherited handler state and keeps running ordinary BSD syscalls and a Mach trap. kern_return_t rc = task_get_exception_ports(mach_task_self(), masks, observed, &count, ports, behaviors, flavors); /* port == MACH_PORT_DEAD -> dead_mask, valid send right -> live_mask */ for (;;) { if (write(fd, ".", 1) != 1) _exit(3); /* heartbeat file */ (void)getpid(); mach_port_t thread = mach_thread_self(); mach_port_deallocate(mach_task_self(), thread); usleep(10000); } Observed output (double-fork case, original VM run). Workload, before and after SIGKILL of the owner (pid 1472): {"kind":"exception_state","role":"root","phase":"before_owner_loss","rc":0,"live_mask":448,"dead_mask":0} {"kind":"exception_state","role":"late-child","phase":"before_owner_loss","rc":0,"live_mask":448,"dead_mask":0} {"kind":"exception_state","role":"root","phase":"after_owner_loss","rc":0,"live_mask":0,"dead_mask":448} {"kind":"exception_state","role":"late-child","phase":"after_owner_loss","rc":0,"live_mask":0,"dead_mask":448} After owner loss, both root (pid 1473) and the detached late-child (pid 1475, own session) were still alive under the same uniqueid/pidversion, reparented to launchd, with heartbeat files still growing. Across 21 owner-death trials in 7 modes, 39 known fixture processes survived and no case left the fixture empty. The 3 breakpoint controls (owner alive) confirmed real exception delivery. Expected contract: a documented kernel-owned boundary prevents continued execution by every inherited member after all control owners disappear, without enumerating descendants after the fact or requiring workload cooperation. I am asking which supported macOS API meets that contract, not asserting that exception ports promise it. Apple DTS asked me to start this thread (Case-ID: 22799543) and will review once I reply with the link. The full reproduction steps and environment details are in the attached text. forum-attachment-reproduction.txt
Replies
3
Boosts
0
Views
532
Activity
Oct ’26