Back to skill

Security audit

doubao-media

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Doubao/Volcengine media-generation skill with some disclosure and robustness gaps, but no evidence of hidden, destructive, or unrelated behavior.

Install only if you are comfortable sending prompts, image URLs, and generated-media requests to Volcengine ARK using your ARK_API_KEY. Avoid secrets or private image links in prompts, review generated files in `~/.openclaw/workspace/output/`, and prefer a pinned dependency setup over the documented unpinned `pip install requests`.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:35
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/doubao_media.py:155
Finding

Unbounded and Insufficiently Validated Remote Media Downloads

Content
View full analysis
Path: """Download file from URL""" timestamp = time.strftime("%Y%m%d_%H%M%S") filename = f"{prefix}_{timestamp}.{ext}" 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 implementation does not: - Restrict the URL to HTTPS or an allowlist of expected media hosts. - Restrict or validate redirects. - Call `raise_for_status()` or otherwise require a successful HTTP status. - Validate the response content type. - Enforce a maximum response size. - Stream data in bounded chunks. Although the media URL ordinarily comes from the Volcengine API rather than directly from a command-line argument, a compromised upstream service or manipulated API response could provide an unexpected URL. Default redirect handling could also send the request to a destination other than the original host. Buffering `response.content` allows a large response to consume substantial process memory, after which the response can also consume disk space. Error pages and non-media data are saved using trusted-looking `.jpeg` or `.mp4` extensions. ### Attack Path 1. The skill requests generated media from the configured Volcengine API. 2. A compromised or malicious upstream response supplies an attacker-controlled media URL, or an otherwise trusted URL redirects to an unexpected destination. 3. `_download_file()` follows the URL without validating its scheme, final host, HTTP status, content type, or size. 4. The attack ...[truncated 851 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/doubao_media.py:119
Finding

Unbounded Video Status Polling and Improper Error Termination

Content
View full analysis
Dict[str, Any]: """Get video generation status""" response = requests.get( f"{BASE_URL}/contents/generations/tasks/{task_id}", headers=self.headers, timeout=30 ) return response.json() if response.status_code == 200 else {"status": "error"} ``` Because the polling loop only terminates for `"succeeded"` or `"failed"`, repeated HTTP errors, a permanently pending task, or any unknown status causes the process to continue indefinitely. Network and JSON parsing exceptions are also not handled, resulting in an uncontrolled crash rather than a structured failure. ### Attack Path 1. A synchronous video-generation task is created. 2. The status endpoint remains pending, returns an ...[truncated 827 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented behavior does not accurately match the skill's effective capabilities and side effects, including image-to-video support, local file download/storage, and questionable claims about automatically sending media to chat. Behavior mismatches are dangerous because they prevent informed consent and can lead users to expose prompts, URLs, or generated files under false assumptions about what the skill actually does.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/doubao_media.py (reported line 186)May include surrounding context.

python
sage tool"""
        try:
            # Use OpenClaw message tool via subprocess
            # The file will be sent automatically by the calling context
            print(f"[Auto-Send] {media_type.capitalize()} ready to send: {file_path}")
        except Exception as e:
            print(f"[Auto-Send] Warning: Could not auto-send: {e}")


def main():
    parser = argparse.ArgumentParser(
        description="Doubao Media Generator - Auto-send to Chat"
    )
    
    subparsers = parser.add_subparsers(dest="command", help="Commands")
    
    # Image generation
    img_parser = subparsers.add_parser("img", help="Generate image / 文生图")
    img_parser.add_argument("prompt", help="Text prompt / 文本描述")
    img_parser.add_argument("--size", default="1024x1024", help="Image size / 图片尺寸")
    
    # Video generation
    vid_parser = subparsers.add_parser("vid", help="Generate video / 文生视频")
    vid_parser.add_argument("prompt", help="Text prompt / 文本描述")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises capabilities that require environment access, network access, and shell execution, but it does not declare any tool scope or permissions. This creates a transparency and containment problem: a user or platform may approve a seemingly simple media skill without realizing it can read environment variables, call external services, and write files locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description does not clearly warn that user prompts and image URLs are transmitted to Volcengine ARK, an external cloud service, and that generated media may be posted back into the conversation. Without a prominent disclosure, users may submit sensitive text or private image links believing processing is local or outputs remain private.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Auto-send is presented as a convenience feature, but there is no explicit warning that generated images or videos will be inserted into the conversation automatically. This can cause accidental disclosure of sensitive or embarrassing generated content, especially in shared chats or when users expect a review step before publication.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description limits the skill to text-to-image and text-to-video with auto-send to chat. However, the file docstring explicitly lists 'Image-to-Video' and the video generation code accepts an input image URL to drive generation, adding a capability not described in the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The image-generation request sends user-supplied prompts to an external API over the network. In this skill context, external transmission is expected functionality, but it still creates a privacy and data-governance risk if users are not adequately informed that their content leaves the local environment.

Content

Scanner excerpt · scripts/doubao_media.py (reported line 68)May include surrounding context.

python
"size": size
        }
        
        response = requests.post(
            f"{BASE_URL}/images/generations",
            headers=self.headers,
            json=payload,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User prompts and optional image URLs are transmitted to an external third-party media-generation service, but the tool does not provide an explicit disclosure or consent step about network data sharing. In an agent-skill context, users may assume local processing and inadvertently send sensitive text, internal URLs, or proprietary image references off-platform.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The video-generation request transmits prompts and possibly an image URL/reference to an external service. Because this skill is intended for media generation, the network call is contextual and expected, but it remains a real privacy risk if sensitive prompts or image-linked resources are disclosed without clear notice.

Content

Scanner excerpt · scripts/doubao_media.py (reported line 111)May include surrounding context.

python
"watermark": False
        }
        
        response = requests.post(
            f"{BASE_URL}/contents/generations/tasks",
            headers=self.headers,
            json=payload,

Tainted flow: 'task_id' from requests.post (line 122, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/doubao_media.py (reported line 155)May include surrounding context.

python
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

Tainted flow: 'local_path' from requests.post (line 136, network input) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/doubao_media.py (reported line 169)May include surrounding context.

python
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

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module description, method docstrings, and comments repeatedly claim generated media is 'auto-sent to chat' and that OpenClaw's message tool is used. In reality, _send_to_chat only prints a readiness message and performs no chat-send action or subprocess invocation, so the documented behavior materially overstates what the code does.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

User-facing text throughout the file is presented bilingually with Chinese included by default, rather than offering an explicit language or locale preference. This may conflict with a language/locale policy if user-facing language should be selectable or opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Generated media is persisted under a predictable local directory in the user's home workspace without a clear warning. In shared or synced environments, this can leave sensitive or embarrassing generated content behind longer than the user expects.

Content

No source excerpt is available for this finding.