T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 19
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Mediumbash npm install -g @music163/ncm-cliTechnical Analysis
The Skill instructs users to install the latest available release of
@music163/ncm-cliglobally without specifying an exact version or verifying package integrity or provenance. Because npm packages can execute lifecycle scripts during installation, the effective code executed by this instruction can change after the Skill has been audited.Global installation expands the potential impact because the package and its executable are placed in the user's global npm environment. The project provides neither a lockfile nor a reviewed copy of the dependency, so the installed implementation cannot be validated from the audited artifact alone.
This finding represents supply-chain exposure rather than evidence that the current npm package is malicious.
Attack Path
- An attacker compromises the npm package, a maintainer account, or a future package release.
- The attacker publishes a malicious version under the legitimate package name.
- A user follows the Skill instruction and runs the unpinned global installation command.
- npm resolves the mutable latest release and may execute attacker-controlled lifecycle scripts during installation.
- The installed executable subsequently runs with the user's privileges.
- The user follows later instructions to configure an application ID, private key, and login session, potentially exposing those assets to the compromised dependency.
Impact Assessment
Exploitation could permit arbitrary code execution with the privileges of the user running npm. The affected scope may include files and credentials accessible to that user, the global npm environment, and sensitive values later supplied to
ncm-cli, including the application private key and auth ...[truncated 256 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example:
bash npm install -g @music163/ncm-cli@X.Y.Z - Verify the selected release's npm provenance, publisher identity, and expected integrity before recommending it.
- Prefer a project-local installation with a committed lockfile over a global installation where operationally practical.
- In automated deployments, use a lockfile-based installation workflow such as
npm ci. - Review package lifecycle scripts and consider disabling them with
--ignore-scriptsif they are not required. - Document the expected package registry and prevent dependency resolution through untrusted registry mirrors.
- Re-audit the dependency before changing the pinned version.
- Avoid entering private keys or login credentials until the installed binary and its provenance have been verified.
- Pin the dependency to an exact, reviewed version, for example:
