T08 · Insecure Dependencies
Error
- Location
- SKILL.md:13
- Finding
- Unpinned Executable npm Dependency Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:13-16`, `SKILL.md:34-36`, and `references/troubleshooting.md:10` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```yaml install: - kind: node package: "@cargo-ai/cli@latest" bins: - cargo-ai ``` ```bash npm install -g @cargo-ai/cli # no global install? prefix every command with `npx @cargo-ai/cli` cargo-ai login --email you@company.com # emailed code, no browser; creates the account on first use # alternatives: --oauth (browser) · --token <api-token> (CI) ``` The troubleshooting guide repeats the unsafe installation recommendation: ```markdown | `command not found: cargo-ai` | CLI not installed or not in PATH | Run `npm install -g @cargo-ai/cli` or prefix with `npx @cargo-ai/cli` | ``` ### Technical Analysis The Skill installs `@cargo-ai/cli@latest` and recommends executing the package through `npx` without specifying an audited version or integrity value. Both approaches resolve a mutable package version at execution time. Consequently, the code that users execute can differ from the version that was present when the Skill was audited. Because this is an executable CLI rather than a passive library, npm package installation scripts and the CLI process run with the permissions of the invoking user. The Skill subsequently authenticates the CLI using an administrative Cargo token or an existing authenticated session. A compromised, malicious, or unexpectedly changed release could therefore access credentials, billing information, workspace resources, and other data available to the authenticated CLI. The audit found no evidence that the current package is malicious. The vulnerability is the absence of dependency pinning and integrity controls, which leaves future executions exposed to upstream package compromise or unsafe release changes. ### Attack Path 1. An att ...[truncated 1393 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@cargo-ai/cli@latest` with an exact, reviewed version: ```yaml package: "@cargo-ai/cli@X.Y.Z" ``` 2. Update all bootstrap and troubleshooting examples to use the same exact version: ```bash npm install -g @cargo-ai/cli@X.Y.Z npx --yes @cargo-ai/cli@X.Y.Z ``` 3. Use npm lockfiles and integrity metadata where the Skill packaging system supports them. 4. Establish a controlled dependency-update process that reviews release notes, package provenance, installation scripts, and changed transitive dependencies before changing the pinned version. 5. Prefer npm provenance verification or signed artifacts when available. 6. Avoid running npm installation commands with elevated operating-system privileges. 7. Use a narrowly scoped token where Cargo supports one, rather than exposing a broadly privileged administrative token to mutable executable code. ]]>
