T08 · Insecure Dependencies
- Location
SKILL.md:22- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 22
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
bash # Or use nrm to switch between mirrors npm install -g nrm nrm use taobaoTechnical Analysis
The Skill instructs the agent to install
nrmglobally without specifying a reviewed version or verifying package integrity. The resolved package and its installation scripts can therefore change after the Skill has been audited.A global npm installation may execute lifecycle scripts under the invoking user's privileges. If the package, a transitive dependency, or the configured registry is compromised, arbitrary code could execute during installation. Global installation also makes the resulting executable available outside the current project.
Attack Path
- An attacker compromises the
nrmpackage, one of its transitive dependencies, or the registry serving it. - A developer or agent follows the Skill and runs
npm install -g nrm. - npm resolves the current mutable version rather than a previously reviewed version.
- Malicious package code or an installation lifecycle script executes with the developer's permissions.
- The globally installed executable remains available to subsequent shell sessions.
Impact Assessment
Successful exploitation could execute arbitrary commands with the privileges of the user running npm. Accessible data may include source code, user configuration, development credentials, and environment variables. The global installation scope can affect projects beyond the one for which the Skill was invoked.
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
nrmto a reviewed exact version, for examplenpm install -g nrm@<reviewed-version>. - Verify package provenance and published integrity metadata before installation.
- Prefer a project-local development dependency over a global installation.
- Use a committed lockfile where project-local installation is possible.
- Disable lifecycle scripts with
--ignore-scriptswhen they are not required. - Periodically review the pinned package and its transitive dependency tree.
- Pin
