[GH-ISSUE #4202] [Other] Image generation passes the prompt to sd-cli as a process argument (visible to other local accounts) #1847

Closed
opened 2026-11-04 01:54:40 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @schmittcn on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4202

With an "images" section in the run config (setup --images qwen-image), serve/images.py sd_cli_args() puts the request prompt on sd-cli's command line ("-p", job["prompt"], line 116 on main 4b9e05a2). Process arguments are readable by every local account via ps / /proc/<pid>/cmdline unless /proc is mounted with hidepid, so on a PC with several accounts another user can read private image prompts while an image is generated. Private config and log permissions do not help here.

Reproduce: enable images, request an image, and as another user run ps -eo args | grep sd-cli.

Suggestion: hand the prompt over without argv, e.g. from a 0600 file in the job dir or stdin, if sd-cli supports it (I have not checked its options).

Low severity: local accounts only, opt-in feature.

Found by a reviewer of a third-party Omarchy plugin that starts Strata models (omacom/omarchy-plugin-marketplace#12853).

System: AMD Radeon RX 6900 XT (16 GB VRAM, gfx1030), 64 GB RAM, Omarchy (Arch Linux, kernel 7.2.8), Strata 0.2.6 (build 0.1.51). The finding is in the code path and does not depend on the hardware; it was read on main 4b9e05a2, image generation is not enabled on this PC.

Originally created by @schmittcn on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4202 With an `"images"` section in the run config (`setup --images qwen-image`), `serve/images.py` `sd_cli_args()` puts the request prompt on sd-cli's command line (`"-p", job["prompt"]`, line 116 on `main` 4b9e05a2). Process arguments are readable by every local account via `ps` / `/proc/<pid>/cmdline` unless `/proc` is mounted with `hidepid`, so on a PC with several accounts another user can read private image prompts while an image is generated. Private config and log permissions do not help here. **Reproduce:** enable images, request an image, and as another user run `ps -eo args | grep sd-cli`. **Suggestion:** hand the prompt over without argv, e.g. from a 0600 file in the job dir or stdin, if sd-cli supports it (I have not checked its options). Low severity: local accounts only, opt-in feature. Found by a reviewer of a third-party Omarchy plugin that starts Strata models (omacom/omarchy-plugin-marketplace#12853). **System:** AMD Radeon RX 6900 XT (16 GB VRAM, gfx1030), 64 GB RAM, Omarchy (Arch Linux, kernel 7.2.8), Strata 0.2.6 (build 0.1.51). The finding is in the code path and does not depend on the hardware; it was read on `main` 4b9e05a2, image generation is not enabled on this PC.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 26, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Add your graphics card with its VRAM, your RAM and your operating system.

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6412828954 --> @github-actions[bot] commented on GitHub (Oct 26, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Add your graphics card with its VRAM, your RAM and your operating system. Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 26, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6412851979 --> @github-actions[bot] commented on GitHub (Oct 26, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello schmittcn,

Thank you for the report and PR #4204. In Strata 0.2.11 the image prompt is written to a file inside the job's own private folder (owner-only permissions, created exclusively) and sd-cli is started with --prompt-file, so the prompt is no longer in the process argument list. The file is removed with the job. We tested this with a stand-in sd-cli that records its arguments; we did not run a real stable-diffusion.cpp image job. On Windows the file mode does not restrict access, the job folder's permissions do. If a prompt still shows up in a process list on 0.2.11, please tell us the platform and the command line you saw.

The Strata project

<!-- gh-comment-id:6658430278 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello schmittcn, Thank you for the report and PR #4204. In Strata 0.2.11 the image prompt is written to a file inside the job's own private folder (owner-only permissions, created exclusively) and sd-cli is started with `--prompt-file`, so the prompt is no longer in the process argument list. The file is removed with the job. We tested this with a stand-in sd-cli that records its arguments; we did not run a real stable-diffusion.cpp image job. On Windows the file mode does not restrict access, the job folder's permissions do. If a prompt still shows up in a process list on 0.2.11, please tell us the platform and the command line you saw. The Strata project
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1847
No description provided.