T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:58
- Finding
- Unpinned Global Installation of a Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md`, line 58 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```markdown 1. **RunComfy CLI** — `npm i -g @runcomfy/cli` ``` ### Technical Analysis The Skill instructs users or agents to install `@runcomfy/cli` globally without pinning a reviewed version or verifying package integrity. The unqualified npm package reference resolves according to registry state at installation time, so the installed implementation can change after this Skill has been audited. npm installation may execute package lifecycle scripts with the privileges of the user performing the installation. The global installation flag also makes the CLI available outside this Skill's execution context. Consequently, compromise of the package, its publisher account, or its dependency chain could introduce arbitrary executable behavior that is neither present nor reviewable in this repository. The CLI is necessary for the Skill's declared image-generation functionality, but globally installing a mutable version exceeds the minimum dependency scope required. This finding does not establish that the current package is malicious; it identifies an avoidable supply-chain exposure. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or a transitive dependency, or publishes a malicious future version. 2. A user or agent follows the prerequisite in `SKILL.md` and runs `npm i -g @runcomfy/cli`. 3. npm resolves the mutable package version available from the configured registry. 4. Malicious package code or lifecycle scripts execute with the installing user's privileges. 5. The globally installed executable remains available to subsequent sessions and may execute again when the Skill invokes `runcomfy`. 6. Depending on the installing user's access, the compromised code could read user-accessible files and credentials, a ...[truncated 798 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to a specifically reviewed release, for example: ```bash npm install --save-exact --ignore-scripts @runcomfy/cli@<reviewed-version> ``` Use `--ignore-scripts` only if the verified package operates correctly without lifecycle scripts. 2. Prefer a project-local dependency over `npm i -g`, and invoke it through a locked project script or an explicitly pinned local binary. 3. Commit and enforce a lockfile containing integrity hashes. Use `npm ci` rather than resolving dependencies dynamically. 4. Document the expected npm registry and package publisher to reduce dependency-confusion and registry-substitution risks. 5. Verify package provenance, signatures or attestations, and published integrity data before installation. 6. Run the CLI in a constrained environment with only the required output directory, network destinations, and credentials available. 7. Avoid installing the package as root or through `sudo`. 8. Periodically review the pinned CLI and its transitive dependencies before upgrading.
