T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:38
- Finding
- Unpinned Global Installation of a Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md:38` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @nimble-way/nimble-cli ``` ### Technical Analysis The installation command retrieves the current npm release of `@nimble-way/nimble-cli` without pinning an exact version or verifying package integrity. Consequently, the dependency executed by users may differ from the version assessed when this Skill was reviewed. npm packages can execute lifecycle scripts during installation. If the package, maintainer account, publication process, or upstream dependency chain is compromised, installation could execute attacker-controlled code with the privileges of the invoking user. The global `-g` installation increases system-wide exposure and can replace an existing trusted CLI. This is a supply-chain weakness rather than evidence that the named package is currently malicious. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or an upstream dependency and publishes a malicious release. 2. A user follows the Skill prerequisite and runs the unversioned global installation command. 3. npm resolves the mutable latest release rather than a previously audited version. 4. Malicious package code or an installation lifecycle script executes with the user's privileges. 5. The globally installed `nimble` command may subsequently execute attacker-controlled behavior whenever the Skill invokes it. ### Impact Assessment Successful exploitation could provide code execution under the installing user's account. Depending on that account's permissions, the attacker could access user-readable files and environment variables, modify user-level configuration, make outbound network requests, or replace the globally trusted `nimble` executable. Administrator-level impact would require the installation itself to be run with elev ...[truncated 16 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to an exact, reviewed version, for example: ```bash npm install -g @nimble-way/nimble-cli@0.5.0 ``` The selected version must be independently verified rather than inferred solely from the Skill metadata. - Prefer a project-local installation governed by a committed lockfile instead of a global installation. - Verify package provenance and registry integrity before installation, including publisher identity and the expected package checksum. - Use npm provenance attestations or an equivalent trusted verification mechanism where available. - Disable lifecycle scripts with `--ignore-scripts` if the package does not require them; otherwise, review the relevant scripts before installation. - Avoid running npm installation with `sudo`, as root, or from another privileged account. - Document a controlled upgrade procedure requiring review and integrity verification before changing the pinned version.
