T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:39
- Finding
- Unpinned Third-Party CLI Installation and Automatic Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 39 **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium ```bash npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version ``` ### Technical Analysis The documented commands retrieve `@runcomfy/cli` without specifying an exact reviewed version or package integrity value. Consequently, npm resolves whichever release is current when the command is run rather than the version that was available during this audit. The `npx -y` alternative is particularly sensitive because it automatically approves package retrieval and executes the resolved package. The global installation command can also execute npm lifecycle scripts during installation. If the package publisher account, package release process, registry response, or a transitive dependency is compromised, newly introduced code could execute locally without any corresponding change to this reviewed skill file. This is a supply-chain exposure rather than evidence that the current `@runcomfy/cli` package is malicious. The CLI source and dependency metadata were not included in the audited project, so its implementation and package integrity could not be independently verified. ### Attack Path 1. An attacker compromises the package publisher, release process, npm registry delivery path, or a transitive dependency. 2. The attacker publishes or causes npm to resolve a malicious release of `@runcomfy/cli` or one of its dependencies. 3. A user or agent follows the instruction in `SKILL.md` and runs the unversioned `npm i -g` or automatic `npx -y` command. 4. npm downloads the attacker-controlled version because no exact version or integrity constraint is specified. 5. Malicious lifecycle scripts or package code execute with the privileges of the invoking user. 6. The malicious code may access files, environment variables, CLI credentials, and network resources available to that user. ...[truncated 717 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a reviewed exact version, for example: ```bash npm install --global @runcomfy/cli@X.Y.Z npx --yes @runcomfy/cli@X.Y.Z --version ``` 2. Document the expected package integrity digest and verify the downloaded package before execution where the installation workflow supports it. 3. Verify npm package provenance, publisher identity, signatures or attestations, and release checksums before approving version updates. 4. Review dependency changes whenever the pinned CLI version is upgraded. 5. Prefer a project-local dependency governed by a committed lockfile over an unconstrained global installation when operationally practical. 6. Disable npm lifecycle scripts during installation where compatible: ```bash npm install --global --ignore-scripts @runcomfy/cli@X.Y.Z ``` Confirm first that the package does not legitimately require an installation script. 7. Execute the CLI as an unprivileged user in a constrained environment with access only to the required input, output directory, and token. 8. Avoid running either installation command with `sudo` or an administrator account. ]]>
