T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned Third-Party CLI Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39–40
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumComplete Code Snippet:
bash # 1. Install (see runcomfy-cli skill for details) npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --versionTechnical Analysis
The documented commands install or execute the current registry-resolved version of
@runcomfy/cliwithout pinning an audited version or verifying an integrity digest.npm i -gmay execute package lifecycle scripts with the invoking user's privileges and makes the package globally available. The alternativenpx -ycommand automatically downloads and executes the resolved package without interactive confirmation. The scoped package name is consistent with the declared vendor, but the instructions provide no immutable version, checksum, lockfile, or other mechanism to ensure that the executed artifact is the version that was reviewed.This creates a software supply-chain exposure: a compromised registry account, malicious future release, or compromised transitive dependency could cause arbitrary package-controlled code to run locally.
Attack Path
- An attacker compromises the package publisher, registry distribution path, a future package release, or a transitive dependency.
- The attacker publishes a malicious version under the expected package name.
- A user or agent follows the Skill's unpinned
npm i -gornpx -yinstruction. - npm resolves and retrieves the attacker-controlled release.
- Package lifecycle scripts or CLI startup code execute with the privileges of the invoking user.
- The malicious code accesses user-readable files, environment variables, or credentials such as
RUNCOMFY_TOKEN, or modifies the user's environment.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the invoking user's privileges. The accessible scope may ...[truncated 275 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically reviewed version, for example
@runcomfy/cli@x.y.z. - Record and verify the expected package integrity digest or use a lockfile-backed installation process.
- Avoid automatic execution through unpinned
npx -y. - Prefer a project-local, least-privilege installation over a global installation where practical.
- Disable lifecycle scripts during installation if the package supports safe operation without them, then invoke only the reviewed entry point.
- Document the authoritative package publisher and registry provenance.
- Review pinned releases and their transitive dependency changes before updating.
- Run the CLI in a restricted environment with only the necessary files and credentials available.
- Pin the CLI to a specifically reviewed version, for example
