T09 · Insecure Skill Coding Practices
- Location
scripts/generate.py:132- Finding
Unvalidated Remote Image URL Enables SSRF and Resource Exhaustion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward Doubao image generator that uses a disclosed Volcengine API key and saves generated images, with manageable privacy and download-safety caveats.
Install only if you are comfortable sending prompts to Volcengine's Doubao API and using a VOLCENGINE_IMAGE_API_KEY in the environment. Avoid prompts containing secrets or regulated personal data, prefer the default workspace output location, and treat downloaded files as untrusted images because the script does not validate URL redirects, file type, or download size.
scripts/generate.py:132Unvalidated Remote Image URL Enables SSRF and Resource Exhaustion
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
sys.stdout.flush()
try:
response = requests.post(API_BASE_URL, headers=headers, json=payload, timeout=60)
if response.status_code == 200:
result = response.json()
The skill documents use of environment variables and an external API, which implies access to secrets and network egress, but it does not declare any explicit tool scope such as permissions or allowed-tools. That makes the capability boundary unclear to users and hosts, increasing the risk of over-privileged execution or unexpected secret/network access when the skill is invoked.
The skill sends user prompts to a third-party image generation service and may return remote image URLs, but the description does not clearly warn users that their input leaves the local environment. This can lead to unintended disclosure of sensitive prompts, metadata exposure through remote URLs, and privacy/compliance issues if users assume the skill is local-only.
The module docstring and user-facing descriptions in this file are presented only in Chinese, which can force a specific language on users without opt-in. The policy allows locale constraints when they are explicitly justified, but no such justification or language choice is provided here.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
sys.stdout.flush()
try:
response = requests.post(API_BASE_URL, headers=headers, json=payload, timeout=60)
if response.status_code == 200:
result = response.json()
The output path is derived from environment variables and then written with open() without constraining it to a trusted base directory. If an attacker can influence OUTPUT_DIR_ENV or OPENCLAW_WORKSPACE, they may cause files to be written to unintended locations, potentially overwriting user-accessible files or placing content in sensitive directories.
try:
response = requests.get(url, timeout=60)
if response.status_code == 200:
with open(save_path, "wb") as f:
f.write(response.content)
return True
else:
The activation/example language is presented only in Chinese, including the usage phrase '生图:一只可爱的小猫', which can imply a fixed language requirement for invoking the skill. The file does not state that other languages are accepted or explain why a Chinese-only interface is required.