T09 · Insecure Skill Coding Practices
- Location
scripts/generate.py:139- Finding
Remote-Controlled Filename Allows Path Traversal and Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated image-generation purpose, but its downloader trusts remote filenames and could write files outside the chosen output folder.
Install only if you are comfortable sending source images and prompts to ComfyDeploy and using a local API key. Before use, the downloader should be fixed to sanitize remote filenames, enforce that writes stay inside the output directory, avoid overwriting existing files by default, and preferably use a lock file for dependencies.
scripts/generate.py:139Remote-Controlled Filename Allows Path Traversal and Arbitrary File Overwrite
scripts/pyproject.toml:6Unbounded and Unlocked Third-Party Dependency Resolution
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)}
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 or raise error."""
api_key = os.environ.get("COMFY_DEPLOY_API_KEY")
if not api_key:
raise ValueError(
The skill instructs use of a script and an external API endpoint, which implies network access and likely environment access, but it does not declare any explicit tool scope or permission boundaries. That makes the capability set opaque to the agent/runtime and increases the risk of over-privileged execution, unexpected data exposure, or misuse of local secrets when the skill is invoked.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import requests
# ComfyDeploy API configuration
COMFY_DEPLOY_API_URL = "https://api.comfydeploy.com/api"
DEPLOYMENT_ID = "9ccbb29a-d982-48cc-a465-bae916f2c7fd"
DEFAULT_TEXT = "Explora distintas perspectivas de esta escena"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import requests
# ComfyDeploy API configuration
COMFY_DEPLOY_API_URL = "https://api.comfydeploy.com/api"
DEPLOYMENT_ID = "9ccbb29a-d982-48cc-a465-bae916f2c7fd"
DEFAULT_TEXT = "Explora distintas perspectivas de esta escena"
The script uploads a user-supplied local image to a third-party API without an explicit warning or consent step at the point of use. In this skill context, inputs are likely marketing or user-generated photos that may contain faces, products, metadata, or other sensitive content, so silent transmission creates a meaningful privacy and compliance risk.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
}
response = requests.post(
f"{COMFY_DEPLOY_API_URL}/run/deployment/queue",
headers=headers,
json=payload
The default text literal is in Spanish, which imposes a specific language choice on users who do not provide --text. There is no accompanying opt-in, locale selection, or justification that this skill is intended only for Spanish-language use.
The dependency specification uses a broad lower bound for requests (>=2.28.0) rather than pinning to a known-safe version, so builds may resolve to a release affected by one of multiple published advisories. In a skill that may fetch remote assets or APIs during image-processing workflows, that uncertainty creates avoidable supply-chain and runtime risk even though the manifest itself does not prove an exploitable version is installed.
No suspicious patterns detected.