T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk
- Content
View full analysis
[options] ``` Or if installed globally (`npm install -g @hlongvu/v0-cli`): ```bash v0 [options] ``` ### Technical Analysis The documentation directs users to globally install and execute `@hlongvu/v0-cli` without specifying an exact package version or verifying its integrity. An unversioned npm installation resolves to the registry's current package release, meaning the code installed by users can change after this Skill has been reviewed. The audited project contains only `SKILL.md`; it does not include the referenced `src/index.js`, a `package.json`, or a dependency lockfile. Therefore, the implementation, transitive dependencies, installation scripts, and handling of the required `V0_API_KEY` cannot be independently audited from this artifact. This does not establish that the referenced package is currently malicious. It creates a supply-chain exposure under which a compromised publisher account, malicious future release, registry compromise, or package substitution could deliver executable code to users following the documented installation procedure. ### Attack Path 1. An attacker compromises the npm publisher account, publishing workflow, or another component of the package's supply chain. 2. The attacker publishes a malicious release under the existing `@hlongvu/v0-cli` package name. 3. A user or automated agent follows the Skill documentation and runs `npm install -g @hlongvu/v0-cli`. 4. Because no exact version or integrity value is specified, npm retrieves the current compromised release. 5. Malicious lifecycle scripts may execute during installation, or malicious CLI code may execute when the user invokes `v0`. 6. The malicious package runs with the privileges of the installing or invoking acco ...[truncated 712 chars]- Remediation
View remediation
``` 2. Prefer a project-local installation over a global installation and invoke it through a pinned package script or local executable. 3. Include the CLI implementation, `package.json`, and lockfile in the reviewed artifact so its code and complete dependency graph can be audited. 4. Verify package provenance through npm provenance attestations, the expected publisher identity, and a trusted registry configuration. 5. Record and verify package integrity hashes in a lockfile or another authenticated dependency-verification mechanism. 6. Disable npm lifecycle scripts during installation where compatible with the package: ```bash npm install --ignore-scripts ``` 7. Run the CLI under a least-privileged account and provide `V0_API_KEY` only to the specific process that requires it. 8. Document the expected package version, publisher, source repository, and release-verification procedure so users can detect package substitution or unauthorized releases. ]]>
