T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:47
- Finding
- Unpinned Global Installation of a Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md:47` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium **Complete Code Snippet**: ```markdown 1. **RunComfy CLI** — `npm i -g @runcomfy/cli` ``` ### Technical Analysis The installation instruction retrieves and globally installs the current release of `@runcomfy/cli` without specifying an exact version, lockfile, checksum, or package integrity value. Consequently, the dependency that users execute can differ from the version available when the Skill was reviewed. Because the package implementation is not included in the project, its behavior could not be audited. npm installation may also execute package lifecycle scripts. A compromised maintainer account, malicious package release, or upstream registry compromise could therefore introduce arbitrary code during installation or subsequent CLI use. The global installation scope increases exposure by placing the executable in the user's global command path. The CLI is also expected to handle the `RUNCOMFY_TOKEN`, edit prompts, image URLs, and output paths, making supply-chain integrity particularly important. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or the upstream publication process. 2. The attacker publishes a malicious release under the legitimate `@runcomfy/cli` package name. 3. A user follows the Skill prerequisite and runs `npm i -g @runcomfy/cli`. 4. npm resolves the unpinned dependency to the malicious release. 5. Malicious code executes through an installation lifecycle script or when the globally installed CLI is invoked. 6. The code can access resources available to the installing user, potentially including RunComfy credentials, submitted prompts, image URLs, and local output files. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user running npm or th ...[truncated 605 chars]
- Remediation
- ## Remediation Suggestions - Pin `@runcomfy/cli` to an exact, reviewed version instead of installing the latest available release. - Publish and verify an expected package integrity hash or signed provenance before installation. - Prefer a project-local dependency with a committed lockfile over a global installation. - Use npm's lockfile and reproducible-install mechanisms where applicable. - Disable package lifecycle scripts during installation where compatible with the CLI. - Run the CLI under a dedicated, least-privileged account or isolated container. - Provide the API token only for the duration of the command and restrict access to the token file. - Establish an update-review process so dependency upgrades are audited before changing the pinned version.
