Skip to content

Glossary

Sandbox

The kernel-enforced policy layer that restricts what a process can do. Foundation of App Store apps, helper isolation, and a lot of XPC service security.

The macOS sandbox is a kernel-enforced policy engine that restricts a process's access to files, IPC, network, and a long list of other syscalls — independently of the user it runs as. It evolved from Apple's Seatbelt project (introduced in Leopard) and is now the foundation of nearly every modern macOS security boundary:

  • Every App Store app runs sandboxed.
  • Every DriverKit driver runs sandboxed.
  • System helper processes (the ones launched via XPC) are usually sandboxed with profiles tighter than what the user could grant.

Policies are written in a Scheme-like DSL (TinyScheme is the interpreter) and compiled to bytecode the kernel evaluates on every controlled syscall.

The kernel side is part of the closed-source Sandbox.kext; the user-visible parts are in sandbox-exec, sandbox_init, and the entitlements baked into a binary's code signature.

See also: SIP, IOKit.