T08 · Insecure Dependencies
- Location
SKILL.md:155- Finding
Unpinned npm Packages May Be Downloaded and Executed Through npx
- Content
View full analysis
/dev/null; then echo "" echo "Running Tailwind dry-run to check purged classes..." npx --yes tailwindcss -i ./input.css -o /tmp/tw-output.css --minify 2>/dev/null echo "Output size: $(du -h /tmp/tw-output.css 2>/dev/null | cut -f1)" fi ``` A second unpinned invocation appears in the suggested cleanup workflow: ```bash # 4. After cleanup, verify no regressions # Run your visual regression tests, or: npx percy snapshot --dry-run # if using Percy ``` ### Technical Analysis The skill invokes npm packages by package name without an exact version, lockfile-backed resolution, or integrity verification. If the requested package is not installed locally, `npx` can retrieve it from a configured npm registry and execute its CLI entry point. The `--yes` option on the Tailwind invocation suppresses the normal installation confirmation. Consequently, the effective executable code is mutable after the skill has been reviewed. A compromised package release, maintainer account, transitive dependency, registry, or npm configuration could cause attacker-controlled JavaScript to execute. Package lifecycle behavior and CLI startup code run with the same operating-system identity and environment available to the agent. Although the skill advertises zero external APIs, these commands can still create outbound registry traffic and retrieve executable third-party content. ### Attack Path 1. A user invokes the CSS dead-code skill in a project where `npx` is available. 2. The Tailwind analysis branch reaches `npx --yes tailwindcss`, or the user follows the suggested `npx percy` verification command. 3. The requested package is absent locally, or npm resolves a mutable version using registry and project configuration. 4. `npx` downloads the packa ...[truncated 1401 chars]- Remediation
View remediation
