T08 · Insecure Dependencies
Error
- Location
- SKILL.md:48
- Finding
- Unpinned Trading CLI Dependency Executes Unreviewed Package Versions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 4 and 48–50 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"💰","homepage":"https://github.com/zeroexcore/trader","requires":{"bins":["trader"],"env":["WALLET_PASSWORD","HELIUS_API_KEY"]},"primaryEnv":"WALLET_PASSWORD","install":[{"id":"node","kind":"node","package":"@zeroexcore/trader","bins":["trader"],"label":"Install trader CLI (npm)"}]}} ``` ```bash npm install -g @zeroexcore/trader # or run without installing: npx @zeroexcore/trader <command> ``` ### Technical Analysis The Skill installs or executes `@zeroexcore/trader` without specifying an exact version, lockfile, or integrity hash. Consequently, npm resolves the package version available from the configured registry at execution time. The effective executable may therefore change after this Skill has been reviewed. The project contains only `SKILL.md`; it does not include the CLI implementation. Claims concerning AES-256-GCM wallet encryption, file permissions, gas-reserve enforcement, network behavior, and transaction safeguards cannot be independently verified from the audited artifact. This dependency has access to particularly sensitive capabilities: - `WALLET_PASSWORD`, `HELIUS_API_KEY`, and potentially `JUPITER_API_KEY`. - The encrypted wallet and trading records under `~/.openclaw/`. - Wallet private-key export functionality. - Authority to sign token swaps and prediction-market transactions involving real funds. The use of `npx` is especially sensitive because it can download and immediately execute the currently resolved package. A malicious package version could also abuse npm lifecycle scripts during installation. No evidence establishes that the current npm package is malicious. The vulnerability is the absence of controls ensuring that the installed code is the same code that was reviewed and trusted. ### Att ...[truncated 1621 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the package to an exact, reviewed version in both installation methods: ```bash npm install -g @zeroexcore/trader@<reviewed-version> --ignore-scripts npx --yes @zeroexcore/trader@<reviewed-version> <command> ``` 2. Record and verify package integrity using a trusted lockfile, npm integrity metadata, or a separately maintained SHA-512 checksum before execution. 3. Review and vendor the corresponding CLI source, or include it in the audited project so its wallet handling, transaction construction, network destinations, and safeguards can be verified. 4. Verify package provenance and publisher identity. Prefer signed releases and npm provenance attestations tied to the reviewed source repository and commit. 5. Disable npm lifecycle scripts with `--ignore-scripts` unless a reviewed installation step requires them. If scripts are required, document and audit each script before execution. 6. Execute the CLI under a dedicated, unprivileged operating-system account. Restrict filesystem access to the minimum wallet directory and never perform global installation as root. 7. Use a dedicated low-value wallet with transaction and balance limits. Require explicit human approval for swaps, prediction-market purchases, private-key exports, and use of `--force`. 8. Supply credentials only for the duration of an invocation and prevent them from being inherited by unrelated child processes. Rotate all credentials immediately if package compromise is suspected. 9. Update the Skill metadata so the automated installer also references the exact reviewed version rather than the floating package name. ]]>
