T08 · Insecure Dependencies
- Location
SKILL.md:41- Finding
Unpinned Third-Party CLI Installation and Automatic Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:41-42
Vulnerability Type: Unpinned and automatically executed third-party dependency
Risk Level: MediumVulnerable Code
bash npm i -g @runcomfy/cli # global install npx -y @runcomfy/cli --version # zero-installThe same unsafe installation options are endorsed again at
SKILL.md:176:text Use `npm i -g @runcomfy/cli` or `npx -y @runcomfy/cli`.Technical Analysis
Both commands resolve
@runcomfy/cliwithout specifying an exact reviewed version. Consequently, the code installed or executed may change after the Skill has been audited.The
npx -ycommand is particularly risky because it automatically downloads and executes the currently resolved package without interactive confirmation. Package installation may also execute npm lifecycle scripts. The global installation alternative persists the resolved package in the user's global npm environment, increasing the duration and scope of exposure.If the package publisher account, npm package, dependency tree, or distribution process is compromised, following these instructions could execute attacker-controlled code with the privileges of the user running npm. The Skill's warning against arbitrary shell installation scripts does not mitigate this package-resolution risk.
Attack Path
- An attacker compromises the
@runcomfy/clipackage, its publisher account, or one of its transitive dependencies. - The attacker publishes a malicious release that is selected by npm's default version resolution.
- A user or agent follows
SKILL.mdand runs the unpinnednpm i -gornpx -ycommand. - npm downloads the compromised package and may execute malicious lifecycle scripts.
- With
npx -y, the downloaded CLI is then executed automatically without confirmation. - The malicious code operates with the invoking user's permis ...[truncated 966 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin
@runcomfy/clito an exact version that has been reviewed, rather than relying on npm's current default resolution:bash npm install --global @runcomfy/cli@<reviewed-exact-version> -
Remove or discourage
npx -y, because it combines remote retrieval with non-interactive execution. Require explicit operator approval before downloading or running a previously absent package. -
Publish and verify the expected package integrity hash. For reproducible deployments, use a lockfile and an installation mode that enforces it, such as
npm ci. -
Document the expected package publisher, registry, exact version, and checksum so operators can verify provenance before execution.
-
Prefer a project-local, pinned dependency over a global installation to reduce persistence and scope.
-
Run the CLI in a restricted environment with only the necessary output-directory access and the required RunComfy credential. Do not expose unrelated credentials or sensitive directories to the process.
-
Review dependency and release changes before updating the pinned version, and use automated supply-chain scanning for the package and its transitive dependencies.
-
