T09 · Insecure Skill Coding Practices
- Location
scripts/generate.py:204- Finding
Unbounded Downloads from User-Controlled and API-Controlled URLs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely does what it claims, but it handles sensitive face and voice media with third-party upload, unclear consent boundaries, and unsafe URL/temp-file handling that should be reviewed before installation.
Install only if you are comfortable sending face images, voice recordings, audio URLs, and generated media through ComfyDeploy. Use only media you own or have consent to process, provide a least-privileged ComfyDeploy API key, avoid private/internal URLs, and prefer running it in a constrained environment until upload consent, URL limits, timeouts, temp-file cleanup, and dependency locking are improved.
scripts/generate.py:204Unbounded Downloads from User-Controlled and API-Controlled URLs
scripts/generate.py:231Sensitive Temporary Audio File Is Not Reliably Deleted
scripts/pyproject.toml:7Runtime Dependency Is Not Reproducibly Pinned
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
files = {"file": (os.path.basename(file_path), f, content_type)}
headers = {"Authorization": f"Bearer {api_key}"}
response = requests.post(
f"{COMFY_DEPLOY_API_URL}/file/upload",
headers=headers,
files=files
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
response = requests.post(
f"{COMFY_DEPLOY_API_URL}/run/deployment/queue",
headers=headers,
json=payload
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if time.time() - start_time > timeout:
raise TimeoutError(f"Run did not complete within {timeout} seconds")
response = requests.get(
f"{COMFY_DEPLOY_API_URL}/run/{run_id}",
headers=headers
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_api_key():
"""Get API key from environment."""
api_key = os.environ.get("COMFY_DEPLOY_API_KEY")
if not api_key:
raise ValueError(
The skill advertises and documents capabilities that require shell execution, network access, and likely environment access, but it does not declare any tool scope or permissions boundaries. This creates a mismatch between what the agent may do and what reviewers or users can assess, increasing the risk of unintended command execution or data handling without explicit approval.
The skill says it should not be used when AI voice generation is needed, but later lists externally generated TTS as a normal use case. This contradiction can misroute requests and bypass intended control separation between skills, making it easier to use synthetic voices in a workflow represented as manual user audio.
The documented workflow sends user media to an external service at api.comfydeploy.com, which is a genuine external transmission path. External transmission is not inherently malicious, but in this context it is security-relevant because the uploaded content includes face images and voice audio that can be sensitive and potentially identifying.
## API Details
**Endpoint:** `https://api.comfydeploy.com/api/run/deployment/queue`
**Deployment ID:** `075ce7d3-81a6-4e3e-ab0e-7a25edf601b5`
## Required Inputs
The skill accepts image and audio inputs and specifies an external API endpoint, but it does not warn that those user-provided files will be transmitted to a third party. Because image and voice recordings are highly sensitive biometric and personal data, failing to disclose external transfer can violate user expectations, consent requirements, and privacy controls.
The manifest frames the skill as operating on a user's own recording, but the later documentation broadens it to arbitrary audio sources, including externally generated or non-user content. That inconsistency weakens safety expectations and can cause the skill to be applied to third-party audio or content types the user did not intend, undermining consent and policy boundaries.
The skill accepts arbitrary remote image and audio URLs, downloads remote audio locally, and uploads media to a third-party cloud service, but the skill description frames the tool as operating on user-provided files. This mismatch can cause unanticipated data egress and creates SSRF-style risk against internal or sensitive URLs if the execution environment can reach them.
The hardcoded external API endpoint establishes a built-in data egress path to a third-party service. While not inherently malicious, this is security-significant because the skill handles user image/audio content and the manifest does not clearly communicate off-platform transfer.
import requests
# ComfyDeploy API configuration
COMFY_DEPLOY_API_URL = "https://api.comfydeploy.com/api"
DEPLOYMENT_ID = "075ce7d3-81a6-4e3e-ab0e-7a25edf601b5"
The script depends on a third-party cloud API and reads a bearer credential from the environment, but that external dependency and credential use are not disclosed in the skill description. In a skill context, undisclosed secret usage and off-platform processing are security-relevant because operators may unknowingly grant networked data access and expose user media to an external processor.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
raise RuntimeError(f"Failed to convert audio: {e.stderr}")
except FileNotFoundError:
raise RuntimeError(
"FFmpeg not found. Install with: sudo apt install ffmpeg"
)
This request queues processing on an external cloud service using user-provided media URLs, meaning user content and associated metadata leave the local environment. In the context of a skill that appears simple and local from its description, undisclosed external transmission materially increases privacy and compliance risk.
}
}
response = requests.post(
f"{COMFY_DEPLOY_API_URL}/run/deployment/queue",
headers=headers,
json=payload
The manifest presents the skill as a straightforward media transformation, but the implementation shells out to ffmpeg for audio conversion. Local subprocess execution is an additional capability that is not described and is not inherent from the manifest wording alone.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
No suspicious patterns detected.