Appearance
SEC386 / CLAUDE-GIT-CHECKOUT-PERMISSION
SEC386 flags shared Claude settings when permissions.allow grants the exact token Bash(git checkout:*).
Why It Matters
git checkout changes branch or file state and can discard or overwrite in-progress work when used broadly. Putting that authority into a shared AI policy makes workspace mutation easier to inherit than a narrower reviewed workflow.
Trigger Shape
The rule triggers only when all of these are true:
- the file is a detected Claude settings surface
- the path is not fixture-like
permissions.allowcontains the exact tokenBash(git checkout:*)
Clean Cases
These stay clean:
- more specific command examples such as
Bash(git checkout feature/branch) - unrelated Git permissions like
Bash(git status) - fixture-like examples under test or fixture paths
Example Trigger
json
{
"permissions": {
"allow": ["Bash(git checkout:*)", "Read(*)"]
}
}Safer Example
json
{
"permissions": {
"allow": ["Bash(git status)", "Read(*)"]
}
}How To Fix
Remove shared Bash(git checkout:*) permissions, or replace them with a narrower reviewed workflow that does not grant broad checkout authority by default.