T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:44
- Finding
- Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md:44` **Vulnerability Type**: Unpinned third-party dependency installation and automatic execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version ``` ### Technical Analysis The documented commands install or retrieve `@runcomfy/cli` without specifying a reviewed version or integrity constraint. Consequently, npm resolves the package version available under the package's current distribution tag at execution time. The `npx -y` alternative automatically approves package retrieval and executes the resolved package. The global installation path may also run package lifecycle scripts. If the npm package, its dependencies, publisher credentials, or release process is compromised, code that was not present during this audit could execute with the invoking user's privileges. This is a supply-chain exposure rather than evidence that the current package is malicious. The audited project contains only `SKILL.md`; it does not contain the external CLI's source code or an embedded malicious payload. ### Attack Path 1. An attacker compromises the `@runcomfy/cli` npm package, a transitive dependency, or the associated publishing process. 2. The attacker publishes a malicious release under the package version selected by the current npm distribution tag. 3. A user or agent follows `SKILL.md:44` and runs the unpinned `npm` or automatic `npx -y` command. 4. npm downloads the attacker-controlled release after the Skill itself has already been reviewed. 5. Package lifecycle or runtime code executes in the invoking user's security context. 6. The malicious package may access data and permissions available to that user, including the documented RunComfy token environment or configuration if present. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user i ...[truncated 808 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, for example: ```bash npm install --global @runcomfy/cli@<reviewed-exact-version> ``` 2. Do not recommend automatic `npx -y` execution of an unpinned package. If `npx` is required, specify the exact version and avoid suppressing user confirmation. 3. Verify package provenance, publisher identity, signatures where supported, and npm integrity metadata before installation. 4. Review and pin transitive dependencies through a lockfile in managed deployments. 5. Install and execute the CLI as an unprivileged user in a sandbox or container with access only to required inputs, output directories, credentials, and network destinations. 6. Prevent lifecycle-script execution during installation where operationally compatible, then explicitly run only the reviewed CLI entry point. 7. Document a known-good package version and a controlled update process requiring security review before changing it.
