Appearance
SEC494 / MD-NPM-EXEC-ALLOWED-TOOLS
SEC494 flags AI-native markdown frontmatter when allowed-tools grants the exact token Bash(npm exec:*).
Why It Matters
npm exec resolves and runs packages on demand. In shared skill or instruction frontmatter, that creates a mutable package-execution path for everyone who 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(npm exec:*)
Clean Cases
These stay clean:
- more specific project commands such as
Bash(npm run lint) - frontmatter without
Bash(npm exec:*) - fixture-like examples under test or fixture paths
Example Trigger
yaml
allowed-tools:
- Bash(npm exec:*)
- ReadSafer Example
yaml
allowed-tools:
- Bash(npm run lint)
- ReadHow To Fix
Replace Bash(npm exec:*) with a narrower reviewed command, or remove shared mutable package-execution authority from the frontmatter entirely.