fix(tools): add bare git command patterns to allowedTools

Git commands without arguments (git push, git status, git diff, etc.) were not matched by the existing wildcard patterns. Added bare variants and git stash support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MoltBot Service
2026-02-14 23:00:03 +00:00
parent be3cd0200b
commit ad31b25af3
2 changed files with 11 additions and 1 deletions

View File

@@ -60,16 +60,24 @@ ALLOWED_TOOLS = [
"Bash(.venv/bin/python3 *)",
"Bash(pip *)",
"Bash(pytest *)",
# Git
# Git — both bare commands and commands with arguments
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push)",
"Bash(git push *)",
"Bash(git pull)",
"Bash(git pull *)",
"Bash(git status)",
"Bash(git status *)",
"Bash(git diff)",
"Bash(git diff *)",
"Bash(git log)",
"Bash(git log *)",
"Bash(git checkout *)",
"Bash(git branch)",
"Bash(git branch *)",
"Bash(git stash)",
"Bash(git stash *)",
# Node/npm
"Bash(npm *)",
"Bash(node *)",