Appearance
SEC507 / MD-GH-REPO-CREATE-ALLOWED-TOOLS
SEC507 flags AI-native markdown frontmatter when allowed-tools grants the exact token Bash(gh repo create:*).
Why It Matters
gh repo create provisions new remote repositories. Shared frontmatter should not quietly make repository creation a default capability for every agent that loads the file.
Trigger Shape
The rule triggers only when all of these are true:
- the file is an AI-native markdown instruction surface
- the path is not fixture-like
allowed-toolsorallowed_toolscontains the exact tokenBash(gh repo create:*)
Clean Cases
These stay clean:
- more specific read-only repo commands such as
Bash(gh repo view:*) - frontmatter without
Bash(gh repo create:*) - fixture-like examples under test or fixture paths
Example Trigger
yaml
allowed-tools:
- Bash(gh repo create:*)
- ReadSafer Example
yaml
allowed-tools:
- Bash(gh repo view:*)
- ReadHow To Fix
Replace Bash(gh repo create:*) with a narrower reviewed command, or remove shared repository-creation authority from the frontmatter entirely.