T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:24
- Finding
- Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 24-29 **Vulnerability Type**: Unpinned and globally installed third-party dependencies **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - Blackbox CLI installed: `npm install -g @blackboxai/cli` - Or install from source: ``` git clone https://github.com/blackboxaicode/cli.git cd cli && npm install && npm install -g . ``` ``` ### Technical Analysis The installation instructions retrieve and execute third-party content without pinning it to a reviewed package version, integrity hash, release artifact, or source commit. The command `npm install -g @blackboxai/cli` resolves the package version at installation time and may execute package lifecycle scripts with the permissions of the invoking user. Its behavior can therefore change after this Skill has been reviewed. Global installation also makes the resulting executable available broadly within the user's environment. The alternative source installation clones the current default branch of an external repository and installs both that mutable source and its dependency graph. Because no commit or signed release is specified, the installed code may differ between executions. This finding concerns the documented installation process. The audited project itself contains only `SKILL.md`; no bundled executable or malicious script was found. ### Attack Path 1. An attacker compromises the referenced npm package, its publishing account, the source repository, or a transitive dependency. 2. The attacker publishes malicious package content, modifies the repository's default branch, or introduces a malicious lifecycle script. 3. A user follows the documented prerequisite and runs one of the unpinned installation procedures. 4. npm downloads the attacker-controlled content and may execute its lifecycle scripts during installation. 5. The malicious code executes with the permissions of the user running npm and can install or ...[truncated 877 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the npm dependency to a specific reviewed version rather than resolving the latest available release: ```sh npm install -g @blackboxai/cli@<reviewed-version> ``` 2. Document package integrity verification using a trusted checksum, registry integrity metadata, or signed release artifact. 3. For source installation, pin the repository to a reviewed commit or signed tag: ```sh git clone https://github.com/blackboxaicode/cli.git cd cli git checkout <reviewed-commit-hash> ``` 4. Use lockfile-enforced dependency installation, such as `npm ci`, with a reviewed and committed lockfile. 5. Review package lifecycle scripts before installation and disable them with `--ignore-scripts` when they are not required. 6. Prefer an isolated, non-global installation environment, such as a dedicated container or restricted user account, to limit access to host files and credentials. 7. Explicitly warn users not to run the installation as root or through `sudo`. 8. Establish a process for periodically reviewing pinned versions and updating them only after source, dependency, and release-integrity validation. ]]>
