T08 · Insecure Dependencies
Error
- Location
- SKILL.md:8
- Finding
- Unpinned Global Installation of a Security-Sensitive Third-Party CLI<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:8-13`; `references/commands.md:3-7` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: High ### Vulnerable Code `SKILL.md:8-13`: ```yaml install: - kind: node package: "@beelabs/beetrade-cli" bins: - beecli label: "Install Beetrade CLI (npm)" ``` `references/commands.md:3-7`: ```bash ## Installation ```bash npm i -g @beelabs/beetrade-cli ``` ``` ### Technical Analysis The skill installs `@beelabs/beetrade-cli` without specifying an exact reviewed version or package integrity value. The documented use of `npm i -g` also installs the package globally, increasing the package's reach within the user's environment. The CLI is subsequently entrusted with Beetrade authentication credentials, brokerage credentials, account information, and live-trading operations. Its implementation is not included in the audited project, so its behavior cannot be verified from the supplied files. Installing an unpinned version means that the code executed at installation and runtime can change after this skill has been reviewed. This creates a supply-chain exposure: a compromised package publisher account, malicious package release, registry compromise, or unexpectedly unsafe future update could introduce code that is automatically installed when the documented workflow is followed. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a future release process. 2. The attacker publishes a malicious version under the existing `@beelabs/beetrade-cli` package name. 3. A user follows the skill installation instructions, which resolve to the current registry version because no exact version is pinned. 4. npm installs and executes the package lifecycle code with the installing user's privileges. 5. The malicious CLI can access data supplied during later authentication, account-management, or trading op ...[truncated 915 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version rather than resolving the latest release: ```yaml package: "@beelabs/beetrade-cli@<reviewed-exact-version>" ``` 2. Pin the same exact version in `references/commands.md`. 3. Record and verify the package integrity hash through a lockfile or equivalent integrity-verification mechanism. 4. Review the package source, installation lifecycle scripts, transitive dependencies, and published artifact before approving a version. 5. Prefer a project-local installation or isolated execution environment over unrestricted global installation. 6. Disable npm lifecycle scripts during installation when they are unnecessary and compatibility has been verified. 7. Establish an explicit update process in which each new version is reviewed before the pin is changed. 8. Verify the npm package owner, provenance, repository, and release-signing information. 9. Run the CLI with least privilege and isolate it from unrelated credentials and sensitive files. ]]>
