T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Third-Party Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 18-22 **Vulnerability Type**: Unpinned global dependency installation **Risk Level**: Medium ### Complete Code Snippet ```markdown Check if `deepbook` is installed: ```bash deepbook --version ``` If not, install it: ```bash npm install -g deepbook-cli ``` ``` ### Technical Analysis The Skill directs users or agents to globally install `deepbook-cli` from the npm registry without specifying an exact version, integrity hash, lockfile, or package provenance validation. As a result, the installed code depends on whichever release the registry resolves at execution time rather than the version reviewed during the Skill audit. The `-g` option increases exposure by installing the package globally. npm installation can execute package lifecycle scripts under the installing user's privileges, while the resulting executable becomes available across projects. A compromised maintainer account, malicious release, dependency compromise, or registry-level supply-chain incident could therefore cause the installation step to execute code that was not present during this review. The audit found no evidence that `deepbook-cli` is currently malicious. The finding concerns the unsafe and mutable dependency acquisition process. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or a transitive dependency and publishes a malicious release. 2. A user or agent follows the Skill and runs `npm install -g deepbook-cli`. 3. npm resolves the unpinned package name to the compromised release. 4. Malicious lifecycle scripts may execute during installation under the user's privileges. 5. The globally installed executable may subsequently access wallet configuration, credentials, transaction data, or other files available to that user. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user performing the installation. De ...[truncated 388 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, for example: ```bash npm install --global deepbook-cli@<reviewed-exact-version> ``` 2. Document the official npm package scope, source repository, publisher identity, and expected package integrity digest. 3. Verify package provenance and integrity before installation, including npm provenance attestations where available. 4. Prefer a project-local installation with a committed lockfile over global installation: ```bash npm install --save-exact deepbook-cli@<reviewed-exact-version> npx deepbook --version ``` 5. Install with a dedicated, least-privileged account and avoid `sudo`. 6. Review package lifecycle scripts and transitive dependencies before approving version updates. 7. Establish an explicit upgrade process in which each new package version is reviewed before changing the pin. ]]>
