T08 · Insecure Dependencies
Error
- Location
- SKILL.md:125
- Finding
- Unpinned Third-Party CLI Installation and Immediate Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 125–129 **Vulnerability Type**: Unpinned dependency installation and execution **Risk Level**: High **Vulnerable Code**: ```bash npm install -g @wavespeed/cli # global install (may need sudo/nvm) npx @wavespeed/cli <cmd> # drop-in, no install needed ``` ```text The npm package name is **`@wavespeed/cli`**, not `wavespeed`. If global install fails due to permissions, `npx @wavespeed/cli` works identically as a drop-in replacement for all subcommands (just prefix every call with `npx @wavespeed/cli` instead of `wavespeed`). ``` ### Technical Analysis The documented installation and execution commands do not pin `@wavespeed/cli` to a reviewed version or verify package integrity. Consequently, the code executed by the agent can differ from the code that existed when this Skill was audited. The `npx @wavespeed/cli` command may download the current package release from the configured npm registry and execute it immediately. The global installation alternative increases exposure by making the package available throughout the user's environment. The accompanying reference to installations that may require elevated installation methods further increases potential impact if a user chooses to run npm with `sudo`. No evidence establishes that the current package is malicious. The vulnerability is the unsafe, mutable supply-chain execution pattern, which creates an exploitable path if the package, publisher account, registry response, or local npm configuration is compromised. ### Attack Path 1. An attacker compromises the package publisher account, a registry dependency, the configured npm registry, or another component of the package supply chain. 2. The attacker publishes or serves a modified release under the expected package name. 3. The user or agent follows the Skill and runs `npx @wavespeed/cli` or globally installs the unpinned package. 4. ...[truncated 1087 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to an exact, reviewed version, such as `@wavespeed/cli@X.Y.Z`, rather than resolving the latest release dynamically. 2. Maintain a lockfile with integrity metadata and install through a controlled project environment using `npm ci`. 3. Verify package provenance, publisher identity, signatures where available, and expected integrity hashes before execution. 4. Avoid global installation and never recommend `sudo npm install`. Use an isolated, least-privileged environment instead. 5. Require explicit user approval before downloading or installing executable dependencies. 6. Establish a version-update review process so a new package release is audited before the pinned version changes. 7. Where feasible, use an internally mirrored or allowlisted registry containing only reviewed package versions.
