Configure the sandbox
The sandbox uses Seatbelt on macOS and Landlock with seccomp on Linux, and on Windows it works only through WSL2. ~/.cursor/sandbox.json controls what sandboxed commands can reach (Cursor docs):
- Keep
typeatworkspace_readwrite:insecure_noneturns the sandbox off. - Deny the network by default: set
networkPolicy.defaulttodeny, list only your registries, and choose “sandbox.json Only” so Cursor’s defaults aren’t added. - Add no home or credential paths: extra paths widen what every sandboxed command can read or write.
The audit’s fix section has a baseline sandbox.json.