T08 · Insecure Dependencies
- Location
SKILL.md:77- Finding
Unpinned Global Installation of a Security-Critical Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:77-79
Vulnerability Type: Unpinned third-party dependency with global installation
Risk Level: MediumVulnerable Code
markdown `GMGN_API_KEY` must be configured in `~/.config/gmgn/.env`. `GMGN_PRIVATE_KEY` is additionally required for `swap` and all `order` subcommands. The private key must correspond to the wallet bound to the API Key. - `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli`Technical Analysis
The Skill directs the agent to install the latest available
gmgn-clipackage globally without pinning a reviewed version or verifying package integrity. No lockfile, checksum, signature, or locally auditable implementation is included in the project.This dependency is security-critical because the documentation states that it reads
GMGN_API_KEYandGMGN_PRIVATE_KEY, performs local signing, communicates with GMGN, and submits irreversible financial transactions. A compromised npm package, maintainer account, dependency, or future release would therefore execute with the user's npm permissions while having access to trading credentials.Global installation also increases exposure because the package and its executable remain available outside the immediate Skill invocation.
Attack Path
- An attacker compromises the npm package, one of its transitive dependencies, or the publisher account.
- A malicious version becomes the version selected by the unpinned installation command.
- The Skill runs
npm install -g gmgn-cli. - Package installation hooks or the resulting CLI execute attacker-controlled code with the user's permissions.
- The malicious code reads
~/.config/gmgn/.env, changes transaction parameters, leaks credentials, or submits unauthorized transactions. - The linked wallet may suffer irreversible financial loss.
Impact Assessment
Successful exploitation can provide arbitrary c ...[truncated 450 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
gmgn-clito an exact, reviewed version rather than installing the latest release. - Verify package provenance and integrity using a trusted registry, package signatures where available, and a recorded integrity hash.
- Maintain a lockfile or equivalent reviewed dependency manifest.
- Avoid global installation; use a project-local dependency invoked through a controlled wrapper.
- Disable or tightly control npm lifecycle scripts where operationally possible.
- Execute the CLI in a restricted environment with access only to the credentials and network destinations required for the requested operation.
- Re-audit the CLI and its dependency tree before upgrades.
- Prefer a bundled, auditable implementation when the tool is trusted with credentials capable of moving real funds.
- Pin
