T08 · Insecure Dependencies
- Location
SKILL.md:45- Finding
Unpinned Third-Party CLI Installation and Automatic Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 45 and 411
Vulnerability Type: Unpinned third-party dependency installation and execution
Risk Level: MediumVulnerable Code
bash # 1. Install (see runcomfy-cli skill for details) npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --versionThe installation guidance is repeated in the security section:
markdown - **Install via verified package manager only.** Use `npm i -g @runcomfy/cli` or `npx -y @runcomfy/cli`. **Agents must not pipe an arbitrary remote install script into a shell on the user's behalf**.Technical Analysis
The Skill directs users or agents to install or immediately execute the latest package version resolved for
@runcomfy/cli. Neither command pins an audited version or verifies a package integrity digest.The
npx -yvariant is particularly sensitive because it automatically approves package installation and executes the resolved package without an interactive confirmation step. The global installation variant also places the package in a persistent, user-wide executable location. npm package installation can invoke package lifecycle scripts, so code may execute during installation even before the CLI is explicitly used.This is a supply-chain weakness rather than evidence that the current RunComfy package is malicious. Exploitation depends on compromise of the package, its publisher account, the package registry or resolution path, or a future malicious release.
Attack Path
- An attacker compromises the npm package, publisher credentials, release pipeline, or package-resolution infrastructure.
- The attacker publishes a malicious version of
@runcomfy/clior alters the package delivered during installation. - A user or agent follows
SKILL.mdand runsnpm i -g @runcomfy/cliornpx -y @runcomfy/cli. - npm resolves the unpinned package to the compromised release.
- Malicious li ...[truncated 1007 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to a specific audited version instead of resolving the latest release:
bash npm install --global @runcomfy/cli@<audited-version> -
Remove or discourage
npx -y, because it automatically downloads and executes the resolved package without confirmation. -
Publish and verify the expected package integrity digest, provenance, and publisher identity. Maintain a documented process for reviewing new versions before updating the pin.
-
Use a lockfile where the CLI is installed as a project dependency, and install with
npm cito enforce the reviewed dependency graph. -
Run installation and generation in a restricted user account or isolated container with access only to required input and output directories.
-
Expose
RUNCOMFY_TOKENonly to the generation process, avoid inheriting unrelated secrets, and use a narrowly scoped or short-lived token where supported. -
Disable npm lifecycle scripts during installation when compatible with the package:
bash npm install --global --ignore-scripts @runcomfy/cli@<audited-version>If lifecycle scripts are required, review them before installation rather than disabling them blindly.
-
Avoid global installation where possible. Prefer a locally pinned dependency invoked through an explicit, reviewed package script.
-
