Putting user content into single-quoted shell commands can enable command injection
Source references: 3The 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.
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.
```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
- **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:```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```