T09 · Insecure Skill Coding Practices
- Location
scripts/doubao_toolkit.py:199- Finding
Arbitrary Local File Disclosure Through Unvalidated Video Upload
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate Doubao API toolkit, but it needs Review because its video-analysis command can upload any readable local file path to Volcengine without validation or confirmation.
Install only if you are comfortable sending prompts, image URLs, and chosen local videos to Volcengine ARK using your ARK_API_KEY. Do not let untrusted prompts or automated workflows choose analyze-vid file paths; use only non-sensitive media, preferably from a dedicated folder, and consider adding confirmation plus file type and size checks before use. Generated files are stored under ~/.openclaw/workspace/output.
scripts/doubao_toolkit.py:199Arbitrary Local File Disclosure Through Unvalidated Video Upload
The skill documents behavior that requires access to environment variables and external network endpoints, but it does not declare any tool scope such as permissions or allowed-tools. This creates a transparency and policy-enforcement gap: a host may not clearly constrain or inform users about the capabilities needed, increasing the risk of unintended secret access or outbound data transmission.
The documentation encourages users to submit prompts, image URLs, and local video files to an external API and notes that outputs are saved locally, but it does not clearly warn about the privacy and data-handling implications. Users may unknowingly transmit sensitive media or prompts to a third-party service and leave generated artifacts on disk, creating confidentiality and compliance risks.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"size": size
}
response = requests.post(
f"{BASE_URL}/images/generations",
headers=self.headers,
json=payload,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"watermark": False
}
response = requests.post(
f"{BASE_URL}/contents/generations/tasks",
headers=self.headers,
json=payload,
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
def get_video_status(self, task_id: str) -> Dict[str, Any]:
"""Get video generation status / 获取视频生成状态"""
response = requests.get(
f"{BASE_URL}/contents/generations/tasks/{task_id}",
headers=self.headers,
timeout=30
The analyze_image method defaults to a Chinese prompt, and similar Chinese-only defaults appear elsewhere, which nudges output behavior toward a specific language without offering a choice. The file is bilingual overall, but the operational defaults still impose a locale preference rather than making language selection explicit.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"max_tokens": 2000
}
response = requests.post(
f"{BASE_URL}/chat/completions",
headers=self.headers,
json=payload,
The analyze_video method sets a Chinese default prompt for content analysis, which establishes a specific language preference by default. Because no locale choice or opt-in is provided, this can conflict with organizational language/locale policy expectations.
The analyze_video function reads an entire local video file, base64-encodes it, and sends it to a remote API, but the user is not explicitly warned at the point of use that local file contents will leave the machine. In a skill/tool context, this can cause unintended disclosure of sensitive recordings, screen captures, or embedded metadata.
This request transmits a full local video file, embedded as base64, to a remote chat/completions endpoint. Because the code operates on a local file path and performs the upload without an explicit upload warning or confirmation, it creates a real risk of unintentional disclosure of sensitive local content.
"max_tokens": 2000
}
response = requests.post(
f"{BASE_URL}/chat/completions",
headers=self.headers,
json=payload,
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
local_path = self.output_dir / filename
response = requests.get(url, timeout=120)
with open(local_path, "wb") as f:
f.write(response.content)
return local_path
The manifest description explicitly includes image-to-image support, and the models table also lists an image-editing model. However, the usage section and API reference in this file do not provide any image-to-image command or method, creating a mismatch between claimed capability and the actual exposed behavior described here.
The top-level description presents a broader capability set, including image/video analysis and additional functions, but the concrete interface documented later is narrower and somewhat inconsistent. This is a mild description-to-behavior mismatch because the high-level claims are not cleanly matched by a complete, corresponding documented interface in the same file.
The client creates a persistent output directory under the user's home directory and later saves downloaded images and videos there. While the code logs generation progress, it does not clearly disclose in the command help or user-facing messaging that files will be stored locally in this path.
The manifest description hard-codes both English and Chinese text in the skill metadata, implying a fixed language/locale presentation rather than offering user choice. Under the stated policy, locale constraints should be optional or explicitly justified as region-specific; no such opt-in or justification appears here.