T08 · Insecure Dependencies
Warning
- Location
- README.md:8
- Finding
- Mutable and Unpinned Installation Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `README.md:8-17`, `SKILL.md:17-20`, `package.json:25-28` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code `README.md:8-17`: ```bash ### Via ClawHub ```bash npx clawhub@latest install knowbster ``` ### Via Skills CLI ```bash npx skills add knowbster ``` ``` `SKILL.md:17-20`: ```bash ```bash # Install dependencies npm install ethers axios ``` ``` `package.json:25-28`: ```json "dependencies": { "ethers": "^6.9.0", "axios": "^1.6.0" } ``` ### Technical Analysis The documented installation process executes packages obtained dynamically from external package registries. In particular, `npx clawhub@latest` explicitly selects the latest available release rather than a reviewed version. The `npx skills add knowbster` and `npm install ethers axios` commands also resolve packages according to mutable registry state. The runtime dependencies use caret ranges, permitting installation of newer compatible releases than those originally reviewed. No lockfile is included in the audited project, so dependency versions and integrity hashes are not fixed. Consequently, a future installation may execute or load dependency code that differs from the code present when the Skill was audited. This is especially significant because the Skill is designed to receive a cryptocurrency wallet private key through `process.env.PRIVATE_KEY`. Although the audited `index.js` does not transmit or log the raw private key, malicious installation-time or runtime dependency code executing in the same process could access environment variables and process privileges. The audit found no evidence that the currently declared `ethers` or `axios` packages are malicious. The vulnerability is the mutable and insufficiently reproducible dependency acquisition process. ### Attack Path 1. An attacker compromises a referenced package, its registry account, or a future permitted release. 2. The at ...[truncated 1432 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace mutable CLI references such as `clawhub@latest` with a reviewed exact version: ```bash npx clawhub@X.Y.Z install knowbster ``` 2. Pin runtime dependencies to exact versions rather than caret ranges: ```json "dependencies": { "ethers": "6.9.0", "axios": "1.6.0" } ``` 3. Generate, review, and commit a package lockfile so resolved versions and integrity hashes are reproducible. 4. Direct users to install with: ```bash npm ci ``` Where compatible with the dependency set, disable lifecycle scripts: ```bash npm ci --ignore-scripts ``` 5. Pin the Skills CLI and any other installation utility to an exact reviewed version. Document the expected publisher, package digest, or release checksum. 6. Use automated dependency monitoring and review all lockfile changes before release. Verify package provenance and signatures where supported by the registry. 7. Run the Skill in a restricted process or container with minimal filesystem and network access. Supply wallet credentials only when a transaction is required. 8. Prefer an external wallet or isolated signing service so the JavaScript process does not receive an exportable private key. Require explicit user approval and transaction previews before signing value-bearing operations. ]]>
