mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
use seatbelt on macos, with two profiles: minimal (default) which only restricts writes, and strict, which is deny-by-default and only allows specific operations (#283)
This commit is contained in:
15
packages/cli/src/utils/sandbox-macos-minimal.sb
Normal file
15
packages/cli/src/utils/sandbox-macos-minimal.sb
Normal file
@@ -0,0 +1,15 @@
|
||||
(version 1)
|
||||
|
||||
;; allow everything by default
|
||||
(allow default)
|
||||
|
||||
;; deny all writes EXCEPT under project directory, temp directory, stdout/stderr and /dev/null
|
||||
(deny file-write*)
|
||||
(allow file-write*
|
||||
(subpath (param "TARGET_DIR"))
|
||||
(subpath (param "TMP_DIR"))
|
||||
(literal "/dev/stdout")
|
||||
(literal "/dev/stderr")
|
||||
(literal "/dev/null")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user