-
Notifications
You must be signed in to change notification settings - Fork 0
Update Claude Code permissions #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,33 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git status*)", | ||
| "Bash(git status)", | ||
| "Bash(git diff*)", | ||
| "Bash(git log*)", | ||
| "Bash(git branch*)", | ||
| "Bash(git push*)", | ||
| "Bash(./scripts/run.sh *)", | ||
| "Bash(./scripts/lint.sh *)" | ||
| ], | ||
| "deny": [ | ||
| "Bash(git push*)", | ||
| "Bash(git push* --force*)", | ||
| "Bash(git push* +*)", | ||
| "Bash(git push* -f*)", | ||
| "Bash(git push* -uf*)", | ||
| "Bash(git push* -vf*)", | ||
| "Bash(git push* -qf*)", | ||
| "Bash(git push* -nf*)", | ||
| "Bash(git push* -df*)", | ||
| "Bash(git reset --hard*)", | ||
| "Bash(rm -rf*)" | ||
| "Bash(rm -rf*)", | ||
| "Bash(rm -fr*)", | ||
| "Bash(rm -Rf*)", | ||
| "Bash(rm -fR*)", | ||
| "Bash(rm -r -f*)", | ||
| "Bash(rm -f -r*)", | ||
| "Bash(rm -R -f*)", | ||
| "Bash(rm -f -R*)", | ||
| "Bash(rm --recursive*)" | ||
|
Comment on lines
+22
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: The current Additionally, please note that simple glob matching is sensitive to whitespace; extra spaces (e.g., Let's expand the deny list to cover these additional "Bash(rm -rf*)",
"Bash(rm -fr*)",
"Bash(rm -Rf*)",
"Bash(rm -fR*)",
"Bash(rm -r -f*)",
"Bash(rm -f -r*)",
"Bash(rm -R -f*)",
"Bash(rm -f -R*)",
"Bash(rm --recursive*)",
"Bash(rm -r --force*)",
"Bash(rm -R --force*)",
"Bash(rm --force -r*)",
"Bash(rm --force -R*)",
"Bash(rm --force --recursive*)",
"Bash(rm --recursive --force*)"References
|
||
| ] | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BLOCKER: Allowing
git push*without restricting--execand--receive-packflags introduces a critical security vulnerability.An agent can execute arbitrary local bash commands by running
git pushwith the--execor--receive-packoption pointing to a local repository path (e.g.,git push --exec="id" .). Sincegit push*is in theallowlist, this command would be executed automatically without user prompting.Please add explicit deny rules for
--execand--receive-packto prevent this command-injection vector.References