T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:43
- Finding
- Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 43–44 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @runcomfy/cli # global install npx -y @runcomfy/cli --version # zero-install ``` ### Technical Analysis The documented installation commands resolve `@runcomfy/cli` without specifying a reviewed version or integrity digest. As a result, the code retrieved and executed can change after the Skill has been audited. The `npx -y` command automatically downloads and executes the package without an interactive confirmation. The global installation command also persists the package outside the project and exposes its executable to later shell sessions. Because the package source and lockfile are not included in the audited project, its installation scripts, transitive dependencies, runtime behavior, telemetry, endpoint restrictions, and handling of credentials cannot be independently verified by this audit. This is a supply-chain weakness rather than evidence that the current package is malicious. It nevertheless permits a compromised npm publisher account, registry response, package release, or transitive dependency to turn the documented setup process into arbitrary local code execution. ### Attack Path 1. An attacker compromises the `@runcomfy/cli` publication account, package, or one of its install-time/runtime dependencies. 2. The attacker publishes a malicious release under the same package name. 3. A user or Agent follows `SKILL.md` and runs either unversioned command. 4. npm resolves the attacker-controlled release because no version or integrity value is pinned. 5. Package lifecycle scripts or CLI initialization code execute with the privileges of the invoking user. 6. The malicious package can access resources available to that user, potentially including `RUNCOMFY_TOKEN`, `~/.config/runcomfy/token.json`, projec ...[truncated 865 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@runcomfy/cli` to a specifically reviewed version rather than resolving the latest release: ```bash npm install --save-exact @runcomfy/cli@REVIEWED_VERSION ``` 2. Commit a lockfile containing resolved transitive dependency versions and integrity hashes. 3. Prefer a project-local installation over `npm install -g` to limit persistence and make dependency state auditable. 4. Avoid automatic `npx -y` download and execution. If npx is necessary, specify the reviewed version and require operator confirmation. 5. Configure npm to use an approved registry and verify package ownership, provenance, signatures, and integrity before installation. 6. Review lifecycle scripts and consider disabling them during installation where compatible: ```bash npm install --ignore-scripts --save-exact @runcomfy/cli@REVIEWED_VERSION ``` 7. Run the CLI in a restricted environment with access only to the required output directory, input data, network destinations, and RunComfy credential. 8. Document an update process requiring review and integrity regeneration before changing the pinned version. 9. Remove obsolete global installations and verify the resolved executable path before invocation.
