T08 · Insecure Dependencies
Error
- Location
- skill.md:40
- Finding
- Unpinned Third-Party CLI Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `skill.md`, lines 40-51 **Vulnerability Type**: Unpinned npm dependency and mutable package execution **Risk Level**: High ### Vulnerable Code ```markdown ### Installation The Moltbet CLI is the primary interface for agent operations. Install it globally: ```bash npm i -g moltbet ``` Or run directly using npx: ```bash npx moltbet@latest <command> ``` ``` ### Technical Analysis The Skill instructs the agent to install or execute the `moltbet` npm package without pinning an exact audited version or verifying a cryptographic integrity value. The explicit use of `@latest` permits the executed package to change after this Skill has been reviewed. Global installation increases the potential scope of compromise by placing package-provided executables in a shared command path. Both installation and `npx` execution may also invoke npm lifecycle scripts or other package-controlled code. The Skill subsequently relies on this package for wallet generation, wallet import, registration, balance management, and financial transactions. Therefore, a compromised package release could receive access to sensitive wallet operations. ### Attack Path 1. An attacker compromises the npm publisher account, package repository, release pipeline, or another relevant supply-chain component. 2. The attacker publishes a malicious version under the expected `moltbet` package name. 3. An agent follows the Skill and runs `npm i -g moltbet` or `npx moltbet@latest`. 4. npm retrieves the current mutable release and executes its installation or CLI code. 5. The malicious package reads accessible configuration, intercepts wallet operations, manipulates transaction parameters, or sends sensitive information to an attacker-controlled service. 6. Because the installed executable is used for subsequent betting and wallet commands, malicious behavior may continue across later invocations. ### Impact Assessment Successful exploitation provi ...[truncated 688 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, such as `moltbet@1.0.0`, rather than using an implicit current version or `@latest`. 2. Verify the expected npm registry, publisher identity, package provenance, and cryptographic integrity before installation. 3. Publish and validate signed release artifacts or checksums through an independent trusted channel. 4. Use a committed lockfile for any local installation and review all transitive dependencies. 5. Avoid global installation. Run the CLI in an isolated container, sandbox, or dedicated low-privilege environment. 6. Disable npm lifecycle scripts where compatible, for example with `--ignore-scripts`, and explicitly review any scripts that are required. 7. Restrict the CLI process so it can access only the wallet and configuration resources strictly required for the requested operation. 8. Require human approval before upgrading to a new package version, especially when wallet or financial functionality is involved. ]]>
