T08 · Insecure Dependencies
- Location
SKILL.md:103- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 103-106
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
markdown ## Installation Requirements This skill requires the npkill CLI tool to be installed globally: ```bash npm install -g npkilltext ### Technical Analysis The installation command does not specify an exact version, integrity hash, lockfile, or other provenance control. It therefore resolves the mutable latest version of `npkill` from the configured npm registry at installation time. npm installation can execute package lifecycle scripts, while the global installation option exposes the installed executable throughout the user's environment. If a future package release, transitive dependency, npm registry response, or configured registry is compromised, following this instruction could install and execute code that was not included in the reviewed Skill. The installed utility is subsequently trusted to scan directories and perform recursive deletion. Although no malicious behavior is present in the audited file itself, relying on an unpinned globally installed package creates a supply-chain risk. ### Attack Path 1. An attacker compromises a future `npkill` release, one of its transitive dependencies, or the npm registry configured on the victim's system. 2. The victim follows the documented `npm install -g npkill` instruction. 3. npm resolves and downloads the attacker-controlled package version because no exact version or integrity constraint is specified. 4. Malicious code executes through an installation lifecycle script or when the globally installed `npkill` command is invoked. 5. The code runs with the privileges of the user executing npm and can access resources available to that account. If installation is performed with administrative privileges, the resulting impact may be correspondingly greater. ...[truncated 513 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
npkillto an explicitly reviewed version rather than installing the mutable latest release. - Record and verify the expected package integrity hash and trusted npm registry.
- Prefer a project-local, lockfile-controlled dependency over global installation.
- Install and execute the package without administrative privileges.
- Review the pinned package, transitive dependency tree, and lifecycle scripts before use.
- Retain the documented dry-run and interactive review steps before permitting deletion.
- Periodically reassess the pinned version and update it only after security review.
- Pin
