Appearance
SEC439 / MD-GIT-CLEAN-ALLOWED-TOOLS
SEC439 flags AI-native markdown frontmatter when allowed-tools grants the exact token Bash(git clean:*).
Why It Matters
Blanket git clean authority lets an agent remove untracked files and directories as part of a default shared policy. In AI-native instruction frontmatter, that creates destructive cleanup power that is wider than most reviewed workflows need.
Trigger Shape
The rule triggers only when all of these are true:
- the file is an AI-native markdown instruction surface with parsed frontmatter
- the path is not fixture-like
allowed-toolsorallowed_toolscontains the exact tokenBash(git clean:*)
Clean Cases
These stay clean:
- more specific reviewed commands such as
Bash(git clean -fd) - frontmatter that does not grant
git clean - fixture-like examples under test or fixture paths
Example Trigger
md
---
allowed-tools:
- Bash(git clean:*)
- Read
---Safer Example
md
---
allowed-tools:
- Bash(git clean -fd)
- Read
---How To Fix
Replace Bash(git clean:*) with a narrower reviewed command pattern, or remove broad git cleanup authority from shared frontmatter entirely.