T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:41
- Finding
- Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 41–44 **Vulnerability Type**: Unpinned npm dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash # 1. Install (see runcomfy-cli skill for details) npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version ``` ### Technical Analysis The skill instructs agents to install or execute `@runcomfy/cli` without specifying a reviewed version. Both commands resolve the package version from the npm registry at execution time: - `npm i -g @runcomfy/cli` installs the currently resolved package globally and may execute npm lifecycle scripts. - `npx -y @runcomfy/cli --version` downloads and executes the resolved package without interactive confirmation. The project provides no lockfile, integrity hash, signature-verification procedure, vendored source, or local implementation through which the installed CLI can be audited. Consequently, the effective code executed by the skill can change after this skill file has been reviewed. This finding does not establish that the current npm package is malicious. The vulnerability is the unsafe trust model: compromise of the package, publisher account, registry resolution path, or a future release could turn the documented installation command into an arbitrary-code-execution vector. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or its release pipeline. 2. The attacker publishes a malicious version under the legitimate `@runcomfy/cli` package name. 3. An agent follows the skill instructions and runs the unpinned global installation or automatic `npx -y` command. 4. npm resolves the attacker-controlled release because no exact version or integrity value is required. 5. Malicious lifecycle scripts or CLI initialization code execute with the privileges of the invoking user. 6. The malicious code may access available RunComfy credentials, local configur ...[truncated 829 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, for example: ```bash npm install --global @runcomfy/cli@X.Y.Z ``` 2. Publish and verify the expected npm integrity hash or signed release provenance before installation. 3. Avoid `npx -y` because it automatically downloads and executes registry content without confirmation. 4. Prefer a project-local dependency governed by a committed lockfile instead of a global installation. 5. Install with lifecycle scripts disabled when compatible: ```bash npm install --ignore-scripts --save-exact @runcomfy/cli@X.Y.Z ``` 6. Execute the CLI in a sandbox or container with narrowly scoped filesystem and network access. 7. Provide the RunComfy token only to the individual invocation that requires it, and use a minimally privileged, revocable token. 8. Document a controlled update process requiring source review, provenance validation, and integrity-value updates before adopting a new CLI release.
