T08 · Insecure Dependencies
Error
- Location
- SKILL.md:4
- Finding
- Unpinned npm Dependency Receives Access to a Mainnet Wallet Private Key<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 4-5 **Vulnerability Type**: Unpinned third-party dependency with access to sensitive wallet credentials **Risk Level**: High ### Vulnerable Code Snippet ```yaml homepage: https://github.com/outsmartchad/outsmart-cli metadata: { "openclaw": { "requires": { "bins": ["outsmart"], "env": ["PRIVATE_KEY", "MAINNET_ENDPOINT"] }, "install": [{ "id": "node", "kind": "node", "package": "outsmart", "bins": ["outsmart"], "label": "Install outsmart CLI (npm)" }] } } ``` ### Technical Analysis The skill installs the npm package `outsmart` without specifying an exact version or package integrity hash. Consequently, installation may resolve to whichever release is tagged as current in the npm registry at installation time. The installed executable also requires the `PRIVATE_KEY` environment variable and is subsequently used to create pools, add or remove liquidity, claim fees, and perform other mainnet financial operations. A process receiving a raw Solana private key can sign arbitrary transactions for every asset and account controlled by that key; the documented transaction type does not technically constrain the signer. The repository contains only `SKILL.md`, so it provides no local implementation from which the installed CLI's key handling, transaction construction, destination addresses, or network communication can be verified. The separate homepage reference does not provide cryptographic assurance that the npm artifact installed at runtime was built from the reviewed repository revision. This creates a supply-chain vulnerability: compromise of the npm package, its publisher account, or a future release can change the effective behavior after the skill has been reviewed. ### Attack Path 1. An attacker compromises the `outsmart` npm publisher account, package, distribution tag, or upstream release process. 2. The attacker publishes a malicious package version under the same package name. ...[truncated 1404 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `outsmart` to an exact, reviewed version rather than resolving the current registry release. 2. Lock and verify the package with a cryptographic integrity hash. Preserve a reviewed lockfile where the skill platform supports it. 3. Verify that the npm package owner, repository, source commit, and published artifact correspond to one another. Prefer reproducible builds and signed release provenance. 4. Disable or strictly review npm lifecycle scripts during installation. Install with script execution disabled when lifecycle scripts are not required. 5. Do not expose a raw mainnet private key to the CLI. Prefer: - A hardware wallet or external signer. - A signer that displays and requires confirmation for each transaction. - A dedicated low-value wallet created solely for LP operations. - Policy-based controls restricting programs, accounts, transaction amounts, and allowed operations. 6. Require a human-readable transaction preview before signing, including program IDs, destination accounts, token mints, amounts, fees, and authority changes. 7. Use a wallet with only the minimum required balance and no unrelated assets or administrative authorities. 8. Store credentials in a secure secret manager and avoid embedding provider tokens in endpoint URLs where possible. 9. Audit the exact installed CLI source and its dependency tree, including key handling, outbound network requests, transaction construction, update behavior, and package installation hooks. 10. Add package provenance verification and dependency monitoring so installation fails if the expected version, digest, signer, or source provenance changes. ]]>
