T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:35
- Finding
- Unpinned Third-Party Package Installation and Immediate Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 35-39 **Vulnerability Type**: Unreviewed and mutable third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash # Global install via npm (recommended for repeat use) npm i -g @runcomfy/cli # Zero-install one-shot (no Node global state) npx -y @runcomfy/cli --version ``` ### Technical Analysis The Skill directs users to download and execute `@runcomfy/cli` without pinning an exact version or verifying its integrity. The project contains no lockfile, package hash, signature, vendored source, or bundled CLI implementation that would allow the executed code to be compared with the version reviewed during this audit. `npm i -g @runcomfy/cli` installs mutable third-party package content globally and may run package lifecycle scripts with the privileges of the invoking user. The installation also persists executable package files outside the Skill directory. Similarly, `npx -y @runcomfy/cli --version` automatically accepts package installation and immediately executes the resolved package. Although described as a zero-install option, it still retrieves executable content from the npm supply chain and may populate the local npm cache. This creates a supply-chain trust boundary: the effective executable payload can change after the Skill has been reviewed. The risk could be realized if the package maintainer account, package release process, transitive dependency, or registry delivery path were compromised. The audit did not establish that the current package is malicious; the vulnerability is the absence of version and integrity controls. ### Attack Path 1. An attacker compromises the `@runcomfy/cli` publication account, its build pipeline, a transitive dependency, or another relevant part of the npm distribution chain. 2. The attacker publishes a modified release containing malicious runtime code or npm lifecycle scripts. 3. A user or Agent follows the Skill in ...[truncated 1296 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version instead of using an unconstrained package reference: ```bash npm install --global --ignore-scripts @runcomfy/cli@<reviewed-version> ``` 2. Publish and verify a cryptographic integrity hash or signed release artifact before installation. Document the expected npm registry and package publisher identity. 3. Avoid `npx -y` because it automatically approves retrieval and execution. Require explicit operator confirmation and display the exact version being executed. 4. Review whether the package requires npm lifecycle scripts. If it does not, install with `--ignore-scripts`. If lifecycle scripts are required, audit and document them before recommending execution. 5. Prefer a lockfile-backed local installation or a verified standalone binary whose version, checksum, and signature are pinned in the Skill documentation. 6. Link to auditable source code corresponding exactly to the pinned release and document a reproducible method for confirming that the distributed package matches that source. 7. Run the CLI as an unprivileged user and expose only the files, output directories, and credentials required for the requested RunComfy operation. Never recommend installation with `sudo`. 8. Treat the package as an external executable trust boundary. Independently verify its claimed network endpoint allowlist, token handling, telemetry behavior, and output-download restrictions before relying on those claims. ]]>
