T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:64
- Finding
- Unpinned Global npm Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:64` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```markdown - `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli` ``` ### Technical Analysis The Skill instructs the Agent to globally install the latest available version of `gmgn-cli` without an exact version pin, integrity verification, lockfile, or source validation. npm packages may execute lifecycle scripts during installation. Because the reviewed project does not include the source code of `gmgn-cli`, its handling of the GMGN API key, signing private key, network requests, and local files cannot be independently verified. The effective behavior of the Skill can change whenever the package publisher releases a new version. ### Attack Path 1. An attacker compromises the npm package, publisher account, or upstream release process. 2. The attacker publishes a malicious version under the expected package name. 3. The Agent follows the Skill instruction and runs `npm install -g gmgn-cli`. 4. Malicious installation scripts or runtime code execute with the privileges of the Agent's operating-system account. 5. The package accesses credentials, including `~/.config/gmgn/.env`, or performs other unauthorized local and network operations. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running the Agent. The affected scope may include: - Theft of `GMGN_API_KEY` and `GMGN_PRIVATE_KEY`. - Access to other files readable by the Agent's user account. - Unauthorized authenticated GMGN requests. - Modification of globally installed commands or packages. - Network communication and further payload retrieval under the user's identity. No evidence establishes that the current package is malicious; the vulnerability is the mutable and unverified dependency installation process. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `gmgn-cli` to an exact, previously reviewed version rather than installing the latest release. - Document and verify the official package name, publisher, and source repository. - Verify package integrity using a trusted digest, npm integrity metadata, or a committed lockfile. - Avoid global installation where possible; use a project-local, isolated dependency environment. - Disable npm lifecycle scripts during installation when compatible with the package. - Review the CLI source code, particularly its credential loading, signing, logging, update, and network-request behavior. - Run the CLI with the minimum filesystem and network privileges required for the requested operation. ]]>
