T09 · Insecure Skill Coding Practices
- Location
scripts/comfy_gen.py:103- Finding
Arbitrary File Overwrite via Server-Controlled Filename Path Traversal
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s image-generation purpose is coherent, but a server-controlled filename can cause local files to be written outside the intended image folder.
Use this only with a trusted local ComfyUI server and non-sensitive prompts/workflows. Before installation, the publisher should harden downloads by generating or sanitizing local filenames, verifying the resolved output path stays inside the intended directory, and documenting that prompts/workflows are sent to the configured server and images are saved locally.
scripts/comfy_gen.py:103Arbitrary File Overwrite via Server-Controlled Filename Path Traversal
The skill documents capabilities that read local workflow files and communicate over the network to a ComfyUI server, but it does not declare any explicit tool scope or permissions. This creates a transparency and policy gap: users and the platform cannot clearly constrain or review the skill's access, increasing the risk of unintended file access or network interactions.
The skill encourages sending prompts and workflow JSON to a locally hosted ComfyUI server over HTTP/WebSocket on the local network, but it does not clearly warn users that this data leaves the agent boundary and may traverse the network unencrypted. Prompts, embedded secrets, internal paths, or workflow contents could be exposed to other local-network observers or logged by the ComfyUI service.
The script sends the user's prompt and full workflow JSON to whatever server address is provided, but it provides no validation, trust boundary checks, or user-facing disclosure about that transmission. In this skill's context, prompts may contain sensitive/private creative material and the workflow can reveal local model usage or custom processing details, so silent transmission to a network-accessible service is a genuine privacy/security concern.
The script downloads content from the server and writes it directly to disk using a filename fully controlled by the remote ComfyUI response. Because filename is interpolated into image-gens/{filename} without sanitization, a malicious or compromised server could supply path traversal values and cause files to be written outside the intended directory, beyond the general undisclosed-download concern.
The negative prompt text includes the phrases "flat chest" and "huge breasts" as undesirable traits. Even though this is a workflow JSON file, these natural-language values can reflect problematic content guidance by treating specific body characteristics as negative attributes.
The workflow writes output files via a SaveImage node using the filename prefix "ZIT-UP/_", but this JSON file contains no nearby comment, description, or other user-facing disclosure that images will be persisted to disk. For code/config workflows, file-write behavior can merit an explicit warning unless clearly documented elsewhere.
The workflow includes a SaveImage node that writes generated images to disk using the prefix "ZIT-UP/_", but the file itself provides no user-facing disclosure that local files will be created. In a local image-generation skill this behavior is expected, but undisclosed persistence can still surprise users and may expose sensitive or private generated content to other local users, backups, or sync tools.
No suspicious patterns detected.