Skip to content
Report library
Purpose / Other

Image Inpainting Skill Security Audit

What the author says it does (original text)

>

Independent security check

Do not install or run it yet

Files checked
1
Risks found
5
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 2
High risk

Putting user content into single-quoted shell commands can enable command injection

Source references: 3
What we found

The examples wrap the entire JSON value in shell single quotes but do not show safe handling for apostrophes in prompts or URLs. The claim that the CLI does not expand prompts overlooks that the shell parses quoting and metacharacters before the CLI receives them.

Why this matters

If an agent substitutes values directly into the template, a prompt or URL containing an apostrophe and shell syntax could escape the JSON argument and execute additional commands with the user's permissions.

This is a plausible command-injection risk. The examples place JSON directly inside a shell single-quoted argument. If a user prompt or URL contains an apostrophe, the shell can terminate the quote and interpret following characters before `runcomfy` receives them. The claim that the CLI does not expand prompt content does not protect this earlier stage. The risk arises when an agent dynamically constructs and executes this form; users can require argument-safe invocation or a safely generated input file.

SKILL.md:100In the instructionsOpen original file
```bashruncomfy run tongyi-mai/z-image/turbo/inpainting \  --input '{    "prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.",    "image": "https://your-cdn.example/street.jpg",    "mask_image": "https://your-cdn.example/cables-mask.png",    "strength": 0.5,    "control_scale": 0.8  }' \  --output-dir ./out```
Show 2 other places
SKILL.md:207In the instructionsOpen original file
- **Token storage**: `runcomfy login` writes the API token to `~/.config/runcomfy/token.json` with mode 0600. Set `RUNCOMFY_TOKEN` env var in CI / containers.- **Input boundary (shell injection)**: prompts and image / mask URLs are passed as a JSON string via `--input`. The CLI does not shell-expand prompt content. **No shell-injection surface**.- **Indirect prompt injection (third-party content)**: source image and mask URLs are **untrusted**; embedded instructions can influence the fill. Agent mitigations:
SKILL.md:99In the instructionsOpen original file
```bashruncomfy run tongyi-mai/z-image/turbo/inpainting \  --input '{    "prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.",    "image": "https://your-cdn.example/street.jpg",    "mask_image": "https://your-cdn.example/cables-mask.png",    "strength": 0.5,    "control_scale": 0.8  }' \  --output-dir ./out```
Medium risk

The installation step executes an unpinned third-party npm package

Source references: 3
What we found

`npm i -g` installs globally and may run package lifecycle scripts, while `npx -y` automatically downloads and executes the currently resolved release. Neither command pins a version or integrity digest.

Why this matters

If the package, publisher account, or a future release is compromised, installation code could read user-accessible data, alter the development environment, or steal credentials.

The installation instructions globally install or automatically download and execute `@runcomfy/cli` through `npx -y`, without a pinned version or integrity value. Although npm is the named source, the resolved code can change over time and carries the usual risk of package installation and execution. Users can require a reviewed pinned version and integrity lock, and prevent agents from performing automatic global installs.

SKILL.md:31In the instructionsOpen original file
```bash# 1. Install (see runcomfy-cli skill for details)npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version
Show 2 other places
SKILL.md:205In the instructionsOpen original file
- **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 in CI / containers.
SKILL.md:30In the instructionsOpen original file
```bash# 1. Install (see runcomfy-cli skill for details)npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version# 2. Sign inruncomfy login              # or in CI: export RUNCOMFY_TOKEN=<token>
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 1
Medium risk

Images, masks, and edit prompts are processed by an external RunComfy service

Source references: 3
What we found

The CLI POSTs JSON containing image URLs, mask URLs, and prompts to the Model API. Even when the user supplies the URLs, this gives an external service access to the content; no verifiable retention, training-use, or downstream-provider terms are included.

Why this matters

Private photos, product assets, document screenshots, sensitive regions revealed by masks, and prompts may be exposed to a third party. Public CDN URLs may also be accessible to anyone who obtains them.

The Skill explicitly sends the prompt plus image and mask URLs to RunComfy's Model API, then polls and downloads the result. The external service therefore receives these inputs and may retrieve the referenced assets. The supplied text does not state retention, training-use, or downstream-provider terms. Before submitting private or restricted images, users can ask for the applicable data-processing terms or limit use to material safe to disclose externally.

SKILL.md:87In the instructionsOpen original file
|---|---|---|---|| `prompt` | string | yes | What fills the masked region; describe preservation constraints for the surround || `image` | string | yes | Source image URL || `mask_image` | string | yes | **Grayscale mask URL** (white = inpaint, black = preserve) || `strength` | float | no | 0.3–0.6 for retouching, 0.7–1.0 for full replacement || `control_scale` | float | no | 0.6–0.9 typical || `aspect_ratio` | enum | no | W:H output ratio |
Show 2 other places
SKILL.md:201In the instructionsOpen original file
The skill picks Z-Image Inpainting when a mask is available, falls back to description-based edit otherwise, and invokes `runcomfy run` with the matching JSON body. The CLI POSTs to the Model API, polls request status, and downloads the result into `--output-dir`.
SKILL.md:212In the instructionsOpen original file
- **Mask provenance**: verify the user actually wants the masked region replaced. Mask reuse from a different image is a common source of bad inpaints.- **Outbound endpoints (allowlist)**: only `model-api.runcomfy.net` and `*.runcomfy.net` / `*.runcomfy.com`. No telemetry.- **Generated-file size cap**: the CLI aborts any single download > 2 GiB.
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.Risks found: 1
Medium risk

The RunComfy account token is persisted on disk or exposed through the CI environment

Source references: 2
What we found

Login writes the API token to a fixed configuration path; the alternative uses an environment variable. Mode 0600 limits access by other local users, but backups, processes under the same account, malicious dependencies, or incorrectly logged CI environments may still obtain it.

Why this matters

A leaked token could let another party consume the user's RunComfy quota, access task information available to the token, or create unauthorized charges.

The documentation directly confirms the credential exposure surface: interactive login persists the API token in the user's configuration directory, while CI uses an environment variable. Mode 0600 blocks direct reads by other local accounts but does not eliminate exposure to processes running as the same user, backups, or CI configuration and logs. Users can require short-lived, least-privilege tokens and restrict access to the file and environment variable.

SKILL.md:34In the instructionsOpen original file
# 2. Sign inruncomfy login              # or in CI: export RUNCOMFY_TOKEN=<token>
Show 1 other places
SKILL.md:206In the instructionsOpen original file
- **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 in CI / containers.- **Input boundary (shell injection)**: prompts and image / mask URLs are passed as a JSON string via `--input`. The CLI does not shell-expand prompt content. **No shell-injection surface**.
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.Risks found: 1
Medium risk

The Skill actively routes watermark removal without confirming the user's right to remove it

Source references: 4
What we found

Watermark removal is both a trigger and a directly documented no-mask workflow. The process does not require confirmation of copyright ownership, permission, or platform rules.

Why this matters

When used on unowned or unlicensed material, the result may infringe copyright or evade attribution requirements, leading to takedowns, account penalties, claims, or commercial disputes.

The Skill treats watermark removal as a trigger and provides direct masked and unmasked workflows, while its verification guidance checks only whether the user wants the region replaced—not whether they have the right to remove the mark. This could facilitate removal of copyright, provenance, or platform identifiers and create legal or policy risk. Users can require ownership, permission, and platform-rule checks before execution and reject unclear authorization.

SKILL.md:11In the instructionsOpen original file
  2 Edit, FLUX Kontext Pro) when a mask isn't available and the  region must be described instead. Use for object removal,  watermark removal, region replacement, blemish cleanup, and any  controlled local edit where a binary mask defines the target  area. Triggers on "inpaint", "inpainting", "image inpaint",  "remove from image", "fill region", "mask-driven edit", "remove  watermark", "remove object", "patch the photo", "fill the hole",  or any explicit ask to edit a specific masked region of a still.
Show 3 other places
SKILL.md:155In the instructionsOpen original file
### Watermark removal- Mask-driven (Route 1, strength 0.5) if mask available- Description-based (Route 2) if no mask: "Remove the watermark in the bottom-right corner. Keep everything else exactly."
SKILL.md:153In the instructionsOpen original file
## Common patterns### Watermark removal- Mask-driven (Route 1, strength 0.5) if mask available- Description-based (Route 2) if no mask: "Remove the watermark in the bottom-right corner. Keep everything else exactly."
SKILL.md:208In the instructionsOpen original file
- **Input boundary (shell injection)**: prompts and image / mask URLs are passed as a JSON string via `--input`. The CLI does not shell-expand prompt content. **No shell-injection surface**.- **Indirect prompt injection (third-party content)**: source image and mask URLs are **untrusted**; embedded instructions can influence the fill. Agent mitigations:  - Ingest only URLs the **user explicitly provided** for this inpaint.  - When the fill diverges from the prompt, suspect the source image (text painted in, hidden EXIF).- **Mask provenance**: verify the user actually wants the masked region replaced. Mask reuse from a different image is a common source of bad inpaints.- **Outbound endpoints (allowlist)**: only `model-api.runcomfy.net` and `*.runcomfy.net` / `*.runcomfy.com`. No telemetry.

Inside this skill

8 instruction sections

The Skill selects a remote model based on mask availability: Z-Image Inpainting when a mask exists, or a description-based editor when it does not.

View source
SKILL.md:201In the instructionsOpen original file
The skill picks Z-Image Inpainting when a mask is available, falls back to description-based edit otherwise, and invokes `runcomfy run` with the matching JSON body. The CLI POSTs to the Model API, polls request status, and downloads the result into `--output-dir`.

The workflow requires a third-party npm CLI and a RunComfy API token supplied through interactive login or an environment variable.

View source
SKILL.md:32In the instructionsOpen original file
# 1. Install (see runcomfy-cli skill for details)npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version# 2. Sign inruncomfy login              # or in CI: export RUNCOMFY_TOKEN=<token>

The source image, mask, and prompt are submitted to RunComfy's Model API, after which the generated result is downloaded to a user-selected local directory.

View source
SKILL.md:38In the instructionsOpen original file
# 3. Inpaintruncomfy run tongyi-mai/z-image/turbo/inpainting \  --input '{"image": "...", "mask_image": "...", "prompt": "..."}' \  --output-dir ./out```
SKILL.md:201In the instructionsOpen original file
The skill picks Z-Image Inpainting when a mask is available, falls back to description-based edit otherwise, and invokes `runcomfy run` with the matching JSON body. The CLI POSTs to the Model API, polls request status, and downloads the result into `--output-dir`.

The declared Bash permission only covers commands beginning with runcomfy; the documented npm installation step falls outside that declaration and requires separate host or user authorization.

View source
SKILL.md:3In the instructionsOpen original file
name: image-inpaintingallowed-tools: Bash(runcomfy *)displayName: "Image Inpainting"
SKILL.md:31In the instructionsOpen original file
```bash# 1. Install (see runcomfy-cli skill for details)npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version
Start here · InstructionsSKILL.md
image-inpainting
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source. 2 more sections are available in the original file.
Files and check records1 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions

Operations mentioned in code and instructions

Run commands
SKILL.md:3In the instructionsOpen original file
name: image-inpaintingallowed-tools: Bash(runcomfy *)displayName: "Image Inpainting"
SKILL.md:30In the instructionsOpen original file
```bash# 1. Install (see runcomfy-cli skill for details)
SKILL.md:99In the instructionsOpen original file
```bashruncomfy run tongyi-mai/z-image/turbo/inpainting \
Connect to websites
SKILL.md:18In the instructionsOpen original file
  or any explicit ask to edit a specific masked region of a still.homepage: https://www.runcomfy.comlicense: MIT
SKILL.md:26In the instructionsOpen original file
[runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting) · [Z-Image Inpainting](https://www.runcomfy.com/models/tongyi-mai/z-image/turbo/inpainting?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting) · [CLI docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting)
SKILL.md:43In the instructionsOpen original file
CLI deep dive: [`runcomfy-cli`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/runcomfy-cli) skill.
Install extra software packages
SKILL.md:32In the instructionsOpen original file
# 1. Install (see runcomfy-cli skill for details)npm i -g @runcomfy/cli      # or:  npx -y @runcomfy/cli --version
SKILL.md:205In the instructionsOpen original file
- **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 in CI / containers.
Lines read
223
File checksum (to compare versions)
c8ba041efc2b579b62da6fabb7b67b00f83bfaae4fbc6f3982559d8729570562