T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:25
- Finding
- Unpinned Global Installation of a Mutable Third-Party CLI Package## Vulnerability Details **File Location**: `SKILL.md`, lines 25–30; the instruction is repeated at line 295 **Vulnerability Type**: Unverified and unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash If the CLI is missing, install it: npm install -g @mldotink/cli # npm (macOS, Linux, Windows) brew install mldotink/tap/ink # Homebrew (macOS) ``` ### Technical Analysis The skill instructs the agent to install the latest available version of `@mldotink/cli` globally. It does not pin an audited version, verify a package integrity digest, validate the publisher or provenance, or restrict npm lifecycle scripts. Because the package reference is mutable, the code installed when the skill is invoked may differ from the code that existed when the skill was audited. npm packages can execute lifecycle scripts during installation. A compromised publisher account, malicious release, registry compromise, or compromised transitive dependency could therefore cause attacker-controlled code to execute locally. The global installation also modifies the user's persistent tool environment rather than using a project-scoped or isolated dependency. The Homebrew alternative similarly references an external mutable tap without pinning or integrity verification. ### Attack Path 1. An attacker compromises the package publisher, distribution account, external tap, or a relevant dependency. 2. The attacker publishes a malicious version under the expected package name. 3. The agent finds that `ink` is not installed and follows the skill instruction. 4. `npm install -g @mldotink/cli` resolves the current mutable package release. 5. Malicious package code or a lifecycle script executes with the privileges of the user running the agent. 6. The installed global executable remains available for later `ink` operations and may intercept authentication data, source code, database tokens, or deploymen ...[truncated 680 chars]
- Remediation
- ## Remediation Suggestions - Pin the CLI to a specific version that has been reviewed, such as `@mldotink/cli@X.Y.Z`. - Verify the package's expected integrity digest, publisher identity, provenance, and release signatures before installation. - Prefer a project-local or isolated installation over a global installation. - Disable npm lifecycle scripts during installation where compatible, then explicitly run only reviewed setup operations. - Use a trusted lockfile and integrity metadata for repeatable installation. - Pin and verify the Homebrew formula or commit rather than consuming an unrestricted mutable tap. - Require explicit user approval before installing or upgrading external executable dependencies. - Revalidate the installed executable path and version before sending credentials or performing cloud operations.
