Back to skill

Security audit

RunComfy CLI — Pro Pack on RunComfy

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent RunComfy CLI guidance, but it normalizes installing and immediately running an unpinned third-party npm package with local token access.

Install only if you trust RunComfy's npm package supply chain. Prefer a pinned, reviewed CLI version, avoid `npx -y` for unattended execution, do not run installs with elevated privileges, keep `RUNCOMFY_TOKEN` out of logs and prompts, and use explicit output directories for generated files.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:35
Finding
Unpinned Third-Party Package Installation and Immediate Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 35-39 **Vulnerability Type**: Unreviewed and mutable third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash # Global install via npm (recommended for repeat use) npm i -g @runcomfy/cli # Zero-install one-shot (no Node global state) npx -y @runcomfy/cli --version ``` ### Technical Analysis The Skill directs users to download and execute `@runcomfy/cli` without pinning an exact version or verifying its integrity. The project contains no lockfile, package hash, signature, vendored source, or bundled CLI implementation that would allow the executed code to be compared with the version reviewed during this audit. `npm i -g @runcomfy/cli` installs mutable third-party package content globally and may run package lifecycle scripts with the privileges of the invoking user. The installation also persists executable package files outside the Skill directory. Similarly, `npx -y @runcomfy/cli --version` automatically accepts package installation and immediately executes the resolved package. Although described as a zero-install option, it still retrieves executable content from the npm supply chain and may populate the local npm cache. This creates a supply-chain trust boundary: the effective executable payload can change after the Skill has been reviewed. The risk could be realized if the package maintainer account, package release process, transitive dependency, or registry delivery path were compromised. The audit did not establish that the current package is malicious; the vulnerability is the absence of version and integrity controls. ### Attack Path 1. An attacker compromises the `@runcomfy/cli` publication account, its build pipeline, a transitive dependency, or another relevant part of the npm distribution chain. 2. The attacker publishes a modified release containing malicious runtime code or npm lifecycle scripts. 3. A user or Agent follows the Skill in ...[truncated 1296 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version instead of using an unconstrained package reference: ```bash npm install --global --ignore-scripts @runcomfy/cli@<reviewed-version> ``` 2. Publish and verify a cryptographic integrity hash or signed release artifact before installation. Document the expected npm registry and package publisher identity. 3. Avoid `npx -y` because it automatically approves retrieval and execution. Require explicit operator confirmation and display the exact version being executed. 4. Review whether the package requires npm lifecycle scripts. If it does not, install with `--ignore-scripts`. If lifecycle scripts are required, audit and document them before recommending execution. 5. Prefer a lockfile-backed local installation or a verified standalone binary whose version, checksum, and signature are pinned in the Skill documentation. 6. Link to auditable source code corresponding exactly to the pinned release and document a reproducible method for confirming that the distributed package matches that source. 7. Run the CLI as an unprivileged user and expose only the files, output directories, and credentials required for the requested RunComfy operation. Never recommend installation with `sudo`. 8. Treat the package as an external executable trust boundary. Independently verify its claimed network endpoint allowlist, token handling, telemetry behavior, and output-download restrictions before relying on those claims. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger condition includes broad language like activation on any explicit ask to call a RunComfy model from script or terminal, which can cause the skill to activate in situations beyond narrowly intended use. Overbroad activation increases the chance an agent will apply this skill in unrelated or adversarial contexts, leading to unintended command suggestions, package execution, or exposure of sensitive local environment details such as auth state and output paths.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The skill recommends executing `npx -y @runcomfy/cli` without pinning an exact package version. Because `npx` resolves the latest published package at execution time, a compromised maintainer account, malicious release, or supply-chain takeover could cause users or agents to run unexpected code immediately during install or version checks.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
This second unpinned `npx -y @runcomfy/cli` reference repeats the same supply-chain risk: it executes whichever package version is current at the time of invocation. Even if presented as a setup step rather than routine execution, it still conditions operators to run remote code without a fixed, reviewed version.

Static analysis

No suspicious patterns detected.