T08 · Insecure Dependencies
- Location
SKILL.md:99- Finding
Unpinned Third-Party CLI Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 99–111
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
markdown ## 补充:命令不可用时 如果执行 `gnomic` 命令时提示找不到命令,说明 `gnomic-cli` 尚未安装,执行以下命令安装: ```bash npm install -g gnomic-clignomic-cli开源地址:https://github.com/huyi9531/gnomic_clitext ### Technical Analysis The Skill directs users or agents to install the latest available version of the third-party `gnomic-cli` npm package globally. The command does not pin a reviewed version, enforce a known integrity hash, use a lockfile, or verify package provenance. Because npm packages can define installation lifecycle scripts, installing the package may execute package-controlled code with the permissions of the account running npm. The global installation scope also allows the package to place commands in the user's global executable path. The linked source repository does not, by itself, establish that the downloaded npm artifact corresponds to reviewed source code. This is a supply-chain weakness rather than evidence that the current package is malicious. Exploitation requires the package, a future release, its maintainer account, or its distribution channel to be compromised. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, or the package publication process. 2. The attacker publishes a malicious release under the existing `gnomic-cli` package name. 3. A user or agent follows the Skill and runs `npm install -g gnomic-cli`. 4. npm resolves the mutable package name to the attacker-controlled release. 5. Malicious lifecycle code can execute during installation with the invoking user's permissions. 6. The package can also install a globally accessible executable that runs attacker-controlled logic when the documented `gnomic` command is invoked. ### Impact Assessment Successful exploitation could p ...[truncated 558 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
gnomic-clito a specific reviewed version instead of resolving the latest mutable release:bash npm install --global gnomic-cli@<reviewed-version> - Record and verify the expected package integrity digest and package provenance before installation.
- Confirm that the npm artifact matches the reviewed source repository and release commit.
- Prefer a project-local, lockfile-controlled dependency over a global installation where practical.
- Avoid elevated installation privileges and document that the command must not be run with
sudoor an administrator account. - Where compatible with the package, disable npm lifecycle scripts during installation and explicitly review any required installation scripts before enabling them.
- Maintain an approved-version policy and repeat the security review before updating the pinned version.
- Pin
