You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a default=deny sandbox working for even basic commands (like cargo check) required extensive debugging through multiple landmines:
Ancestor directory traversal: Seatbelt requires stat() permission on every parent directory for realpath(). Adding subpath "/Users/eliot/.cargo" does NOT implicitly allow stat("/Users") or stat("/Users/eliot"). Fixed in Use "brush" to provide a bash compatible shell with full policy enforcement #262 by auto-adding ancestor literal reads.
Problem
Getting a
default=denysandbox working for even basic commands (likecargo check) required extensive debugging through multiple landmines:Ancestor directory traversal: Seatbelt requires
stat()permission on every parent directory forrealpath(). Addingsubpath "/Users/eliot/.cargo"does NOT implicitly allowstat("/Users")orstat("/Users/eliot"). Fixed in Use "brush" to provide a bash compatible shell with full policy enforcement #262 by auto-adding ancestor literal reads.DNS resolution:
system-socketpermission is needed for mDNSResponder. Not obvious from errors (just "Could not resolve host"). Fixed in Use "brush" to provide a bash compatible shell with full policy enforcement #262.Firmlinks vs symlinks:
std::fs::canonicalizeresolves macOS firmlinks (/Users->/System/Volumes/Data/Users) which breaks Seatbelt matching. Fixed in Use "brush" to provide a bash compatible shell with full policy enforcement #262 with symlink-only resolution.Trailing slashes:
$TMPDIRends with/and Seatbeltsubpathdoes not match paths with trailing separators. Fixed in Use "brush" to provide a bash compatible shell with full policy enforcement #262.No actionable errors: When Seatbelt denies access, the user just sees "Operation not permitted" with no indication which sandbox rule is missing.
The result: most users give up on
default=denyand use a permissive sandbox, defeating the purpose.Suggestions
clash sandbox debugcommand that captures Seatbelt denial logs and suggests missing rules