T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:109
- Finding
- Unpinned Third-Party Packages Executed Through npx## Vulnerability Details **File Location**: `SKILL.md`, lines 109-114; additional instances at lines 599-600 **Vulnerability Type**: Supply-chain exposure through unpinned package execution **Risk Level**: Medium ### Vulnerable Code ```bash # Clinic.js (best overall Node.js profiler) npx clinic doctor -- node app.js npx clinic flame -- node app.js # Flame graph npx clinic bubbleprof -- node app.js # Async bottlenecks # 0x (flame graphs) npx 0x app.js ``` Additional affected commands: ```text - Webpack: npx webpack-bundle-analyzer stats.json - Vite: npx vite-bundle-visualizer ``` ### Technical Analysis The Skill recommends invoking third-party packages through `npx` without pinning package versions or requiring that the packages already be installed from a reviewed lockfile. If a requested package is not present locally, `npx` may retrieve it from the configured package registry and immediately execute its code. This creates a supply-chain trust boundary that is unnecessary for the Skill's underlying performance-analysis methodology. The effective executable code can change after the Skill has been reviewed. A compromised publisher account, malicious package release, registry compromise, dependency compromise, package-name error, or unsafe registry configuration could cause attacker-controlled code to execute. Package installation and execution may also trigger lifecycle scripts. Such code runs with the permissions of the user invoking `npx` and can generally access the current project, writable files, process environment, developer credentials available to the process, and network resources accessible from the host. ### Attack Path 1. A user follows the profiling or bundle-analysis instructions from the Skill. 2. The named package is not already available in the local project. 3. `npx` resolves the package through the user's configured package registry. 4. The registry supplies a compromised, mal ...[truncated 1009 chars]
- Remediation
- ## Remediation Suggestions 1. Add required tools as reviewed development dependencies using exact versions and commit the package-manager lockfile. 2. Execute only the locked local package binaries. Where supported, use `npx --no-install` so execution fails rather than downloading an absent package. 3. Avoid floating versions and do not rely on the registry's current default or latest release. 4. Review dependency provenance, maintainers, transitive dependencies, lifecycle scripts, and published integrity metadata before adoption. 5. Use a trusted registry or approved internal mirror with package allowlisting and integrity verification. 6. Run profiling tools in an isolated, least-privileged environment without production credentials or unnecessary network access. 7. Update the Skill text to warn users that `npx` may download and execute remote package code.
