T08 · Insecure Dependencies
Error
- Location
- SKILL.md:38
- Finding
- Unpinned Global Installation of Unverifiable Third-Party Executable Code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 38–40 **Vulnerability Type**: Unsafe and unpinned third-party package installation **Risk Level**: High ### Vulnerable Code ```bash npm install -g forgex-cli ``` ### Technical Analysis The Skill directs users to globally install `forgex-cli` from the npm registry without specifying an exact version, package integrity hash, lockfile, or verified source revision. The project contains only `SKILL.md`; therefore, the package implementation and its dependency graph cannot be audited from the supplied artifact. An npm package can execute lifecycle scripts during installation. Global installation also places executable files in a shared command location. Because the installed CLI is subsequently entrusted with wallet passwords, private keys, signing operations, and fund transfers, compromise of either the package or one of its dependencies would create a direct path to credential and asset theft. This finding does not establish that the current npm package is malicious. It identifies a supply-chain boundary that the Skill leaves mutable and unverifiable. ### Attack Path 1. An attacker compromises the `forgex-cli` npm publisher account, package, or transitive dependency, or publishes a malicious future release. 2. The user runs the documented unpinned global installation command. 3. npm resolves the mutable package name to the compromised release. 4. Malicious lifecycle code may execute during installation with the invoking user's privileges, or malicious CLI code executes when `forgex` is invoked. 5. The installed CLI receives wallet credentials and transaction instructions during normal use. 6. The malicious implementation can read those secrets, alter transaction destinations, sign unauthorized transactions, or transmit sensitive material externally. ### Impact Assessment Code supplied by the package can execute with the operating-system privileges of the user who invokes npm or the CLI ...[truncated 278 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the CLI source code and dependency manifests in the auditable project. 2. Pin an exact package version rather than resolving the latest mutable release. 3. Verify npm integrity metadata and publish reproducible build instructions. 4. Commit and enforce a dependency lockfile for development or local installation. 5. Avoid global installation; use a project-local dependency or a verified, version-pinned execution mechanism. 6. Disable unnecessary npm lifecycle scripts during installation where operationally possible. 7. Audit the package and all transitive dependencies before allowing access to wallet keys. 8. Run the CLI in a sandbox with restricted filesystem and network access. 9. Require signed releases and document the expected package publisher, source repository, release hash, and verification procedure. ]]>
