T08 · Insecure Dependencies
- Location
SKILL.md:168- Finding
Unpinned npx Commands May Download and Execute Untrusted Packages
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:168-169, 432-433
Vulnerability Type: Supply-chain code execution through implicit package retrieval
Risk Level: HighVulnerable Code
bash npx eslint --fix . && npx prettier --write . npx biome check --apply .bash npx jest --coverage npx nyc <test-cmd>Technical Analysis
The workflow invokes package executables through
npxwithout requiring that they already exist as lockfile-pinned local dependencies. Depending on the installed npm/npx version and configuration,npxcan contact the npm registry, retrieve a missing package, and execute its lifecycle or package code.Consequently, loading the Skill can lead from a local lint or coverage operation to remote third-party code execution. The effective package payload may differ from what was inspected during this audit. The workflow does not enforce:
- Local-only package resolution.
- A trusted lockfile.
- Package version pinning.
- Registry allowlisting.
- Integrity verification before execution.
- Explicit user approval before package retrieval.
Although the named packages are established tools, relying only on package names does not protect against registry compromise, dependency compromise, configuration-based registry redirection, or unexpected resolution when a package is absent locally.
Attack Path
- A repository includes a configuration that causes the workflow to select an
npx-based lint, formatting, or coverage command. - The relevant executable is not installed locally, or npm is configured to resolve it through an attacker-controlled or compromised registry.
- The workflow runs an unpinned
npxcommand. npxretrieves the remotely resolved package or dependency graph.- Package installation hooks or executable code run with the Agent process's privileges.
- The malicious code can access repository files and environment variables, modify files, and initiate network requests subject to host-le ...[truncated 691 chars]
- Remediation
View remediation
Remediation Suggestions
- Require tools to be declared in a lockfile-backed project dependency set.
- Use local-only execution, for example:
bash npx --no-install eslint --fix . npx --no-install prettier --write . npx --no-install biome check --apply . npx --no-install jest --coverage npx --no-install nyc <test-cmd>- Prefer package-manager commands that enforce offline or immutable resolution where supported.
- Abort with a clear message if the required local executable is unavailable; do not install it automatically.
- If installation is necessary, obtain explicit user approval, pin an exact version, use an approved registry, and verify lockfile integrity.
- Run third-party development tools in a sandbox with minimal filesystem, environment-variable, and network access.
