Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions dot_claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"hooks": [
{
"type": "command",
"command": "grep -q '\"dangerouslyDisableSandbox\"[[:space:]]*:[[:space:]]*true' && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"サンドボックス外での実行には承認が必要です\"}}'; exit 0",
"command": "input=$(cat); cmd=$(printf '%s' \"$input\" | jq -r '.tool_input.command // \"\"'); flag=$(printf '%s' \"$input\" | jq -r '.tool_input.dangerouslyDisableSandbox // false'); danger=false; [ \"$flag\" = \"true\" ] && danger=true; printf '%s' \"$cmd\" | grep -Eq '(^|[[:space:]])(--upload-pack|--receive-pack|--exec-path)(=|[[:space:]]|$)' && danger=true; printf '%s' \"$cmd\" | grep -Eq '(^|[[:space:]])(GIT_SSH_COMMAND=|GIT_CONFIG_[A-Za-z_]*=)' && danger=true; if printf '%s' \"$cmd\" | grep -Eq '(^|[[:space:]])git([[:space:]]|$)' && printf '%s' \"$cmd\" | grep -Eq '(^|[[:space:]])(-c|-C)([[:space:]]|=|$)'; then danger=true; fi; if [ \"$danger\" = \"true\" ]; then printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"サンドボックス外実行またはgitの危険なグローバルオプション使用には承認が必要です\"}}'; fi; exit 0",
"timeout": 10,
"statusMessage": "sandbox-escape-gate"
}
Expand All @@ -28,7 +28,29 @@
},
"permissions": {
"allow": [
"Bash(git *)",
"Bash(git status)",
"Bash(git status *)",
"Bash(git log)",
"Bash(git log *)",
"Bash(git diff)",
"Bash(git diff *)",
"Bash(git show *)",
"Bash(git branch)",
"Bash(git branch *)",
"Bash(git remote -v)",
"Bash(git fetch)",
"Bash(git fetch *)",
"Bash(git pull)",
"Bash(git pull *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push)",
"Bash(git checkout *)",
"Bash(git switch *)",
"Bash(git stash*)",
"Bash(git tag*)",
"Bash(git rev-parse *)",
"Bash(git blame *)",
"WebFetch(domain:github.com)",
"WebFetch(domain:api.github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
Expand Down Expand Up @@ -69,7 +91,12 @@
"Bash(git push --force *)",
"Bash(git push -f *)",
"Bash(git reset --hard *)",
"Bash(git clean -f *)"
"Bash(git clean -f *)",
"Bash(git * --upload-pack*)",
"Bash(git * --receive-pack*)",
"Bash(git * --exec-path*)",
"Bash(git -c *)",
"Bash(git -C *)"
]
},
"sandbox": {
Expand All @@ -96,7 +123,14 @@
"~/.netrc",
"~/.config/gcloud/",
"~/.config/gh/",
"~/.kube/"
"~/.kube/",
"**/.env",
"**/.env.*",
"**/.envrc",
"**/secrets/**",
"**/credentials",
"**/*.pem",
"**/*.key"
],
"allowWrite": [
"~/.npm",
Expand Down
Loading