T08 · Insecure Dependencies
Error
- Location
- SKILL.md:16
- Finding
- Unpinned Global Installation of a Mutable Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md`, lines 16–19 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ```sh npm install -g ccdb-cli@latest ccdb-cli --version ``` ### Technical Analysis The Skill instructs the host to globally install `ccdb-cli` using the mutable `@latest` npm tag. This tag can resolve to a different package version at any time after the Skill has been reviewed. Installation may execute package lifecycle scripts, while later use executes the installed CLI itself. Because neither an immutable version nor an integrity hash is specified, the host cannot ensure that the downloaded package is the same artifact that was previously audited. A compromised package release, maintainer account, registry publication process, or transitive dependency could consequently introduce executable code into the host environment. The global installation scope also increases exposure by modifying the user's shared tool environment rather than an isolated, task-specific environment. The document separately recommends downloading the latest GitHub release and checking its checksum, but it does not provide a pinned release, trusted digest, or signature against which the artifact must be verified. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, the release process, or a dependency included in a future `ccdb-cli` release. 2. The attacker publishes a malicious version under the `latest` distribution tag. 3. A user approves installation and the agent executes `npm install -g ccdb-cli@latest`. 4. npm downloads the attacker-controlled release and may execute malicious lifecycle scripts during installation. 5. The installed binary can also execute attacker-controlled logic when `ccdb-cli --version`, authentication, diagnostic, or query commands are subsequently invoked. 6. The malicious code runs with the permissions of the account performing the ins ...[truncated 569 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `ccdb-cli@latest` with an explicitly reviewed and immutable package version. 2. Verify package integrity using a trusted, pinned cryptographic digest or signature obtained through a separately authenticated channel. 3. Avoid global installation where possible. Use an isolated environment, locked project dependency, container, or restricted execution sandbox. 4. Disable npm lifecycle scripts during installation when they are unnecessary, and review any required lifecycle scripts before enabling them. 5. Lock and audit transitive dependencies using a committed lockfile or equivalent reproducible dependency mechanism. 6. Require explicit user approval before installing or upgrading executable dependencies, and display the exact version and integrity value to be installed. 7. For standalone binaries, pin a specific release rather than using the latest-release endpoint and require checksum or signature verification before execution. 8. Run the CLI under a least-privileged account with restricted filesystem, credential, and network access.
