Back to skill

Security audit

Face Swap — Pro Pack on RunComfy

Security checks for vulnerabilities and agentic risk

Overview

This skill is a clearly disclosed RunComfy face-swap helper with dual-use risks and an unpinned CLI install that users should handle carefully.

Install only from a trusted npm context, prefer pinning a reviewed @runcomfy/cli version, and use a limited token or sandbox when possible. Only use the skill with media and identities you have rights to use, and do not use it for deceptive, explicit, defamatory, or non-consensual face swaps.

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:44
Finding

Unpinned Third-Party CLI Installation and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:44
Vulnerability Type: Unpinned third-party dependency installation and automatic execution
Risk Level: Medium

Vulnerable Code

bash
npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version

Technical Analysis

The documented commands install or retrieve @runcomfy/cli without specifying a reviewed version or integrity constraint. Consequently, npm resolves the package version available under the package's current distribution tag at execution time.

The npx -y alternative automatically approves package retrieval and executes the resolved package. The global installation path may also run package lifecycle scripts. If the npm package, its dependencies, publisher credentials, or release process is compromised, code that was not present during this audit could execute with the invoking user's privileges.

This is a supply-chain exposure rather than evidence that the current package is malicious. The audited project contains only SKILL.md; it does not contain the external CLI's source code or an embedded malicious payload.

Attack Path

  1. An attacker compromises the @runcomfy/cli npm package, a transitive dependency, or the associated publishing process.
  2. The attacker publishes a malicious release under the package version selected by the current npm distribution tag.
  3. A user or agent follows SKILL.md:44 and runs the unpinned npm or automatic npx -y command.
  4. npm downloads the attacker-controlled release after the Skill itself has already been reviewed.
  5. Package lifecycle or runtime code executes in the invoking user's security context.
  6. The malicious package may access data and permissions available to that user, including the documented RunComfy token environment or configuration if present.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user i ...[truncated 808 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to an exact reviewed version, for example:
    bash
    npm install --global @runcomfy/cli@<reviewed-exact-version>
    
  2. Do not recommend automatic npx -y execution of an unpinned package. If npx is required, specify the exact version and avoid suppressing user confirmation.
  3. Verify package provenance, publisher identity, signatures where supported, and npm integrity metadata before installation.
  4. Review and pin transitive dependencies through a lockfile in managed deployments.
  5. Install and execute the CLI as an unprivileged user in a sandbox or container with access only to required inputs, output directories, credentials, and network destinations.
  6. Prevent lifecycle-script execution during installation where operationally compatible, then explicitly run only the reviewed CLI entry point.
  7. Document a known-good package version and a controlled update process requiring security review before changing it.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger text includes a broad catch-all activation condition covering essentially any request to substitute one identity for another, which can cause the skill to activate in ambiguous contexts. Because this skill performs dual-use face-swapping/deepfake operations, overbroad invocation increases the chance of unsafe automation, policy bypass, or accidental handling of high-risk impersonation requests.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The skill instructs use of npx -y @runcomfy/cli without pinning an exact version, so each execution may fetch and run the latest package from the registry. If the package is compromised, a dependency is hijacked, or a breaking release is published, the agent could execute attacker-controlled code on the host.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 306)May include surrounding context.

md
## Security & Privacy

- **Consent**: see the "Consent & disclosure" section above. Face-swap is dual-use and the skill does not gate inputs — the responsibility rests with the operator. **Refuse user requests that target real people without consent**, or that aim at defamatory / sexually explicit / otherwise harmful synthetic media, regardless of what the CLI accepts.
- **Install via verified package manager only.** Use `npm i -g @runcomfy/cli` or `npx -y @runcomfy/cli`. **Agents must not pipe an arbitrary remote install script into a shell on the user's behalf**.
- **Token storage**: `runcomfy login` writes the API token to `~/.config/runcomfy/token.json` with mode 0600. Set `RUNCOMFY_TOKEN` env var to bypass the file in CI / containers.
- **Input boundary (shell injection)**: prompts and asset URLs are passed as a JSON string via `--input`. The CLI does not shell-expand prompt content. **No shell-injection surface**.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

This repeated guidance again recommends npx -y @runcomfy/cli with no version pin, creating a remote code execution supply-chain risk because npx resolves and runs whatever current package version is available. In an agent context, that is especially sensitive because it may run with access to user files, tokens, and network capabilities.

Content

No source excerpt is available for this finding.