T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Third-Party CLI Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20-24`; duplicated in `README.md:20-24` **Vulnerability Type**: Unpinned and globally installed third-party dependency **Risk Level**: Medium ### Vulnerable Code `SKILL.md:20-24`: ```markdown If NOT_INSTALLED, install it: ```bash npm install -g debank-cli ``` ``` `README.md:20-24`: ```markdown ### 1. Install the CLI ```bash npm install -g debank-cli ``` ``` ### Technical Analysis The project instructs users or the agent to install `debank-cli` globally without specifying an exact version, package integrity hash, or other immutable verification information. Consequently, the package contents installed during each invocation depend on the version currently resolved by the npm registry rather than the version reviewed when this skill was audited. An npm installation may execute package lifecycle scripts under the permissions of the invoking user. The global installation flag also places package files and executable entry points into shared user-level or system-level npm locations. The audited project does not include the CLI source, a lockfile, a checksum, or a mechanism proving that the npm artifact corresponds to the linked source repository. This does not establish that the current `debank-cli` package is malicious. It creates a supply-chain exposure in which compromise of the package publisher, npm account, registry distribution path, or a future release could introduce attacker-controlled code. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another component of the `debank-cli` distribution chain. 2. The attacker publishes a malicious version under the same package name. 3. A user or agent follows the documented prerequisite and runs `npm install -g debank-cli`. 4. npm resolves the mutable package reference to the attacker-controlled release. 5. Malicious lifecycle scripts can execute during installation, or the installed `debank` ex ...[truncated 1069 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `debank-cli` to an exact, reviewed version rather than allowing npm to resolve the latest release: ```bash npm install --global --ignore-scripts debank-cli@X.Y.Z ``` 2. Confirm whether the package requires lifecycle scripts before using `--ignore-scripts`. If scripts are required, audit those scripts and their transitive dependencies before permitting execution. 3. Publish and document the expected npm publisher identity, exact package version, and registry integrity digest. Verify the downloaded artifact against an independently maintained checksum. 4. Prefer a project-local dependency over a global installation so dependency state is isolated and reproducible: ```bash npm install --save-exact debank-cli@X.Y.Z ``` 5. Commit an appropriate lockfile when using a local dependency, and use reproducible installation commands such as `npm ci`. 6. Execute the CLI under a least-privileged account and avoid installing it with `sudo` or administrator permissions. 7. Restrict the runtime environment so the CLI can access only the DeBank credential and resources necessary for wallet queries. 8. Update both `SKILL.md` and `README.md` so their installation guidance remains consistent and does not reintroduce an unpinned global installation. ]]>
