T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 21-25 and 35 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Complete Code Snippet ```yaml install: - id: npm kind: npm package: bool-cli global: true bins: ["bool"] label: "Install bool-cli (npm)" ``` ```markdown 1. **Install**: `npm install -g bool-cli` ``` ### Technical Analysis The Skill directs users or agents to install `bool-cli` globally using only its mutable npm package name. It does not pin a reviewed version, specify an integrity digest, provide a lockfile, or disable npm lifecycle scripts. npm installation can execute package lifecycle scripts, while a global installation exposes the resulting executable throughout the user's environment. Consequently, the effective code installed by this Skill can change after the Skill has been audited. If the npm package, publisher account, or a future release is compromised, following these instructions could execute attacker-controlled code with the privileges of the user performing the installation. No evidence in the audited file establishes that the current `bool-cli` package is malicious. The vulnerability is the unsafe, mutable dependency-installation practice and the associated supply-chain exposure. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another component of the package's dependency chain. 2. The attacker publishes a malicious version under the same `bool-cli` package name. 3. An agent follows `npm install -g bool-cli` without selecting a previously reviewed version. 4. npm resolves the mutable package name to the attacker-controlled release. 5. Malicious package code may run through an installation lifecycle script or when the globally installed `bool` executable is invoked. 6. The code executes with the installing user's privileges and can access ...[truncated 689 chars]
- Remediation
- ## Remediation Suggestions - Pin `bool-cli` to a specific, reviewed version rather than resolving the latest mutable release. - Verify the package using a trusted integrity digest and retain a lockfile or equivalent reproducible-installation record. - Prefer a project-local installation over a global installation to reduce scope and prevent unintended executable replacement. - Run the CLI with `npx --ignore-existing` or an equivalent controlled mechanism only after verifying the exact package version and integrity. - Disable npm lifecycle scripts with `--ignore-scripts` where the package can function without them. - Verify package provenance, publisher identity, release signatures, and repository correspondence before installation. - Execute the package in a restricted environment with minimal filesystem, credential, and network access.
