Appearance
SEC498 / MD-YARN-DLX-ALLOWED-TOOLS
SEC498 flags AI-native markdown frontmatter when allowed-tools grants the exact token Bash(yarn dlx:*).
Why It Matters
yarn dlx resolves and executes packages through a mutable runner path. Shared frontmatter should not silently make that a default capability.
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(yarn dlx:*)
Clean Cases
These stay clean:
- more specific project commands such as
Bash(yarn install) - frontmatter without
Bash(yarn dlx:*) - fixture-like examples under test or fixture paths
Example Trigger
yaml
allowed-tools:
- Bash(yarn dlx:*)
- ReadSafer Example
yaml
allowed-tools:
- Bash(yarn install)
- ReadHow To Fix
Replace Bash(yarn dlx:*) with a narrower reviewed command, or remove shared mutable package-execution authority from the frontmatter entirely.