T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:24
- Finding
- Unpinned Third-Party Dependencies## Vulnerability Details **File Location**: `SKILL.md`, lines 24 and 29 **Vulnerability Type**: Supply-chain exposure through unpinned npm dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm install viem ``` ```bash npm install @solana/kit @solana-program/token ws dotenv bs58 ``` ### Technical Analysis The installation commands do not specify exact dependency versions. The audited project also contains no package manifest or lockfile that would ensure deterministic dependency resolution. Consequently, running these commands at different times may install different direct and transitive package versions. npm lifecycle scripts belonging to those packages may execute during installation. This is particularly sensitive because the documented usage loads EVM and Solana private keys into the resulting Node.js process and constructs cryptocurrency transactions. If a listed package, its release process, or one of its transitive dependencies is compromised, malicious installation or runtime code could access wallet secrets, alter transaction recipients or amounts, or run arbitrary commands under the user's account. The audit found no evidence that the currently named packages are malicious. The vulnerability is the absence of reproducible, reviewed dependency pinning and integrity controls. ### Attack Path 1. An attacker compromises a listed npm package, its maintainer account, or a transitive dependency and publishes a malicious release. 2. A user follows the Skill's unversioned `npm install` instructions. 3. npm resolves the compromised release because no exact versions or lockfile constrain dependency selection. 4. Malicious code executes through an installation lifecycle script or when the dependency is imported. 5. The code reads wallet keys from environment variables or local key files, modifies transaction data, or executes commands with the user's operating-system privileges. 6. Stolen secrets can then be used to authorize transactions f ...[truncated 700 chars]
- Remediation
- ## Remediation Suggestions 1. Add a reviewed `package.json` that declares all direct dependencies using exact versions rather than ranges or floating latest releases. 2. Generate and commit a lockfile, such as `package-lock.json`, to pin direct and transitive dependency versions and integrity hashes. 3. Instruct users and automation to run `npm ci` against the committed lockfile instead of unconstrained `npm install` commands. 4. Review transitive dependencies and npm lifecycle scripts before approving dependency updates. 5. Use automated dependency scanning and controlled update pull requests, with security and functionality review before lockfile changes are merged. 6. Consider disabling lifecycle scripts during installation with `npm ci --ignore-scripts` when compatible with the reviewed dependency set. 7. Run transaction tooling in a least-privileged environment with narrowly scoped secrets, restricted filesystem access, and wallet accounts containing only the funds required for the intended operation.
