T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned Third-Party Packages Are Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 16–24 **Vulnerability Type**: Supply-chain exposure through unpinned npm dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @wavespeed/cli wavespeed login # opens https://wavespeed.ai/accesskey and stores the key wavespeed status # confirms you are signed in ``` ```markdown Prefer MCP tools over shell commands? The same platform is exposed by [`@wavespeed/mcp`](https://github.com/WaveSpeedAI/mcp-server) (`npx -y @wavespeed/mcp`; tools `search_models`, `get_model_schema`, `get_price`, `upload_file`, `run_model`, `get_prediction`). It shares the CLI's stored login. ``` ### Technical Analysis The setup instructions install `@wavespeed/cli` globally without an exact version and execute `@wavespeed/mcp` through `npx -y` without a version or integrity pin. Consequently, the package content executed by users can change after this Skill has been reviewed. npm installation can execute package lifecycle scripts, while `npx -y` can automatically download and run the currently resolved registry version without an interactive confirmation. The repository contains no pinned dependency manifest, lockfile, integrity hash, or vendored implementation that would make the executed code reproducible or auditable. This is a supply-chain weakness rather than evidence that the current WaveSpeed packages are malicious. Exploitation requires compromise of the relevant package, publisher account, registry resolution, or a future package release. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution channel, or a future release of one of the referenced packages. 2. The attacker publishes a modified package containing malicious lifecycle or runtime code. 3. A user follows `SKILL.md` and runs either the unpinned global installation or `npx -y @wavespeed/mcp`. 4. npm resolves the attacker-controlled r ...[truncated 1012 chars]
- Remediation
- ## Remediation Suggestions 1. Pin each dependency to an exact, reviewed version, for example `@wavespeed/cli@X.Y.Z` and `@wavespeed/mcp@X.Y.Z`. 2. Replace `npx -y` execution with a project-local, version-pinned installation controlled by a committed lockfile. 3. Verify package provenance, signatures, publisher identity, and npm integrity metadata before approving upgrades. 4. Prefer a reproducible installation process such as `npm ci` with a committed lockfile rather than resolving the latest package at execution time. 5. Avoid global installation where practical and execute the dependency under a dedicated, least-privileged user or isolated environment. 6. Review lifecycle scripts and package contents before upgrades. Disable installation scripts when compatible with the package's documented operation. 7. Document an explicit dependency-update review process so version changes trigger a new security audit. 8. Restrict the runtime's access to unrelated files and environment variables, and protect stored API credentials with narrowly scoped permissions and regular rotation.
