T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:71
- Finding
- Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, line 71 **Vulnerability Type**: Unpinned dependency installation and execution **Risk Level**: Medium **Vulnerable code snippet**: ```markdown 1. **RunComfy CLI** — `npm i -g @runcomfy/cli` (or `npx -y @runcomfy/cli --version`) ``` ### Technical Analysis The documented installation commands do not pin `@runcomfy/cli` to a reviewed version or verify its integrity. Consequently, npm resolves the package version available under the applicable default distribution tag at execution time. The `npx -y` alternative automatically downloads and executes the resolved package without an interactive confirmation step. The global installation alternative also places the package and its executable into the user's global npm environment, increasing persistence and the potential impact of a compromised release. This is a supply-chain weakness rather than evidence that the current package is malicious. However, the effective code executed by users can change after this skill has been audited. Package lifecycle scripts and the CLI itself execute with the privileges of the invoking user. A global installation is not required merely to invoke the hosted generation service and therefore exceeds the minimum installation scope necessary. The separately flagged network behavior is necessary for the declared hosted video-generation functionality. `SKILL.md` discloses that prompts and user-approved reference URLs are submitted to the RunComfy Model API using a bearer token. No hidden exfiltration behavior was identified in the audited file. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry resolution path, or another dependency included in a future `@runcomfy/cli` release. 2. The attacker publishes a malicious version under the package's default distribution tag. 3. A user follows the skill instructions and runs either `npm i -g @runcomfy/c ...[truncated 1297 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to an exact, reviewed version, for example: ```bash npx --yes @runcomfy/cli@<reviewed-exact-version> --version ``` 2. Publish the expected version and package integrity digest in the skill documentation. Verify the downloaded package against that digest before execution where tooling permits. 3. Prefer a project-local installation governed by a committed lockfile instead of a global installation: ```bash npm install --save-exact @runcomfy/cli@<reviewed-exact-version> ``` 4. Use `npm ci` with a reviewed lockfile in automated environments so dependency resolution is reproducible. 5. Review the package's transitive dependencies and lifecycle scripts before updating the pinned version. 6. Run the CLI under a restricted, non-administrator account and expose only the files, output directory, network destinations, and credentials required for the generation request. 7. In CI, scope the RunComfy token to the minimum required API permissions and billing limits, inject it only for the relevant command, and rotate it if dependency compromise is suspected. 8. Avoid automatic execution of newly resolved package versions. Updates should require a separate review and integrity-validation process.
