allowlist entry readonly
This commit is contained in:
1 parent
9ce4756fad
commit
e668eb1b0d
4 files changed
+182
-7
No files matched your search
@@ -18,6 +18,12 @@ sandbox = true # hx --sandbox (bwrap); required for yolo = tru
|
||||
|
||||
- Absent: no policy, hx may use every tool (orch prints a warning unless `sandbox = true`).
|
||||
- `TOOL` allows every call of that tool (`read`, `write`, `edit`, `bash`, `lsp`, ...), `*` allows all.
|
||||
- `readonly`: bash commands that only look, one simple command each: `ls cat head tail wc grep rg fd find pwd echo
|
||||
stat file du df which tree diff sort cut nl tr jq basename dirname` and `git status|diff|log|show|blame|ls-files|rev-parse`.
|
||||
Flags that run or write are refused per command (`find -exec/-delete/-fprint*`, `fd -x/--exec`, `rg --pre`,
|
||||
`sort -o/--output`, `tree -o`, `git --output/--ext-diff/--textconv`), and so are `git -C`, other git subcommands and
|
||||
anything outside the worktree. Typical profile: `allow = ["read", "write", "edit", "readonly", "Grep", "Glob", "LS",
|
||||
"bash:cargo *"]`. In `claude_cli` mode Claude's other tools arrive under Claude's own names and need their own entry.
|
||||
- `bash:PATTERN`: `*` glob over the whole command. Only simple commands match (no `; & | < > $ ( ) { } \` or
|
||||
newline); path-like words must resolve inside the worktree or `read_roots`.
|
||||
- Always denied, even with `*`: `git push` (publishing is the sink's job), credential-looking paths (`.env*`,
|
||||
|
||||
Reference in new issue
Block a user