T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned Global Installation of an Unverified npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8 and 65
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
bash npm install -g github-discoverThe same installation command is presented initially at line 8 and recommended again in the standard workflow at line 65.
Technical Analysis
The skill directs users to install
github-discoverglobally from the npm registry without specifying an exact version, integrity digest, lockfile, verified source repository, or package provenance. Consequently, the installed code depends on whichever package version the registry resolves at installation time rather than the version reviewed when this skill was audited.npm packages may execute lifecycle scripts during installation. If the package publisher account, release process, or registry artifact is compromised, following this instruction could execute attacker-controlled lifecycle code. The global
-ginstallation also exposes the resulting executable outside an isolated project environment and makes it available to other sessions and projects.The audited file does not prove that the current package is malicious. The vulnerability is the unsafe and non-reproducible dependency acquisition process.
Attack Path
- An attacker compromises the npm package, its publisher account, or its release pipeline and publishes a malicious version.
- A user follows the skill documentation and runs
npm install -g github-discover. - npm resolves the unpinned package name to the attacker-controlled version.
- Malicious npm lifecycle code may execute during installation with the privileges of the installing user.
- The globally installed
github-discoverexecutable may subsequently execute attacker-controlled behavior whenever the skill invokes it. - Depending on user permissions, the malicious code could access user-readable files, enviro ...[truncated 757 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version instead of resolving the latest release:
bash npm install --save-exact github-discover@<reviewed-version> - Prefer a project-local installation over
-gand invoke the binary through a package script or a controlled local path. - Commit a lockfile containing npm integrity metadata and use
npm cifor reproducible installation. - Verify the package publisher, source repository, release provenance, and npm signatures or attestations before approving a version.
- Review the package and its transitive dependencies, including all lifecycle scripts.
- Where compatible, install with lifecycle scripts disabled:
bash npm install --ignore-scripts --save-exact github-discover@<reviewed-version> - Perform installation and execution in a sandbox or container with minimal filesystem permissions, no unnecessary credentials, and restricted network access.
- Document the approved version and integrity digest in
SKILL.md, and require a new security review before updating it.
- Pin the dependency to an exact, reviewed version instead of resolving the latest release:
