T08 · Insecure Dependencies
- Location
SKILL.md:129- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 129–136
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
markdown ## Supplement: When the Command Is Unavailable If executing the `gnomic` command reports that the command cannot be found, install `gnomic-cli` with the following command: ```bash npm install -g gnomic-clignomic-cliopen-source repository: https://github.com/huyi9531/gnomic_clitext ### Technical Analysis The Skill instructs users or agents to install the latest available version of `gnomic-cli` globally from the npm registry. The dependency is not pinned to a reviewed version, and the instruction does not require package-integrity verification, provenance validation, or review of npm lifecycle scripts. A link to a GitHub repository does not establish that the package downloaded from npm was built from the referenced source revision. Consequently, the effective package content can change after this Skill has been audited. npm packages may also execute lifecycle scripts during installation, which means a compromised or malicious release could run code immediately. The global `-g` installation increases the exposure compared with a project-local installation. It places the executable in a globally accessible command location and may modify shared package directories. This finding does not establish that the current package is malicious; the risk arises from trusting an unpinned, externally mutable package without integrity controls. ### Attack Path 1. An attacker compromises the npm publisher account, the package release process, or a future release of `gnomic-cli`. 2. The attacker publishes a modified package version containing a malicious lifecycle script or executable. 3. A user or agent encounters the documented “command not found” condition and follows the Skill instruction. 4. `npm install -g gnomic-cli` resol ...[truncated 1018 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version, such as
gnomic-cli@<audited-version>, rather than installing the latest release. - Prefer a project-local dependency governed by a committed lockfile instead of a global installation.
- Verify package provenance and integrity using registry integrity metadata, trusted checksums, signatures, or reproducible-build evidence.
- Review the exact npm artifact and its lifecycle scripts rather than relying only on the linked source repository.
- Disable lifecycle scripts during installation where compatible, for example by using npm's
--ignore-scriptsoption. - Run the CLI in a sandbox or restricted environment with minimal filesystem access, no unnecessary credentials, and controlled network access.
- Document the expected npm package name, publisher identity, approved version, checksum, and secure update process.
- Avoid elevated privileges for installation and execution.
- Pin the dependency to a specifically reviewed version, such as
