Appearance
SEC393 / MD-GIT-STASH-PERMISSION
SEC393 flags AI-native markdown frontmatter when allowed-tools or allowed_tools grants the exact token Bash(git stash:*).
Why It Matters
Broad stash authority can hide in-progress work and rewrite local state in ways that are hard to review. That is safer as a narrower reviewed workflow than as a shared default permission.
This rule intentionally lives in the opt-in governance preset rather than the main preview lane. Shared stash permissions can be legitimate workflow design, but they still deserve explicit review as a policy choice instead of a headline security claim.
Trigger Shape
The rule triggers only when all of these are true:
- the file is a detected AI-native markdown instruction surface
- the path is not fixture-like
allowed-toolsorallowed_toolscontains the exact tokenBash(git stash:*)
Clean Cases
These stay clean:
- more specific command examples such as
Bash(git stash push -u) - unrelated Git permissions like
Bash(git status) - fixture-like examples under test or fixture paths
Example Trigger
yaml
---
allowed-tools:
- Bash(git stash:*)
- Read
---Safer Example
yaml
---
allowed-tools:
- Bash(git stash push -u)
- Read
---How To Fix
Review whether shared Bash(git stash:*) access is really needed, or replace it with a narrower workflow-specific permission that does not grant broad stash authority by default.