Back to skill

Security audit

For long videos, automatically split the video task, using the last frame of the previous video as the first frame of the current video to maintain video continuity

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its advertised video-generation purpose, but it should be reviewed because its helper can use an unsafe macOS shell call and it sends prompts or images to a third-party service.

Install only if you are comfortable sending prompts, image URLs, and selected local images to Volcengine/ByteDance infrastructure and storing generated outputs locally. Avoid using the download auto-open behavior on macOS until the helper replaces os.system with a non-shell opener or removes auto-open, and confirm task IDs carefully before using delete.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
seedance.py:242
Finding

macOS Command Injection Through User-Controlled Download Path

Content
View full analysis

Vulnerability Details

File Location: seedance.py, lines 242–255
Vulnerability Type: OS command injection
Risk Level: High

python
if download_dir and video_url:
    download_path = Path(download_dir).expanduser()
    download_path.mkdir(parents=True, exist_ok=True)
    filename = f"seedance_{task_id}_{int(time.time())}.mp4"
    filepath = download_path / filename

    print(f"\nDownloading video to {filepath}...")
    try:
        urllib.request.urlretrieve(video_url, str(filepath))
        print(f"Saved to: {filepath}")

        # Open on macOS
        if sys.platform == "darwin":
            os.system(f'open "{filepath}"')

Technical Analysis

The download_dir value originates from the user-controlled --download command-line argument. It becomes part of filepath, which is interpolated directly into a command passed to os.system().

os.system() invokes a shell. Enclosing the path in double quotes does not neutralize all shell syntax: command substitution such as $(...) remains active inside double quotes, and embedded quote characters can alter the command structure. Consequently, a crafted download directory can introduce shell commands.

The vulnerable call is reached only on macOS and after a video has been downloaded successfully. The Base64 processing elsewhere in the file is not itself malicious: it encodes a user-selected local image into a data URL for submission to the declared Volcengine Ark video-generation API.

Attack Path

  1. An attacker influences the value supplied to the CLI's --download option.
  2. The value contains shell-interpreted syntax, such as command substitution, while still representing a creatable directory path.
  3. The Skill submits or waits for a video-generation task.
  4. The remote task succeeds and returns a video URL.
  5. The tool downloads the video into the attacker-influenced path.
  6. On macOS, the tool constructs open "<filepath>" and passes it to os.system().
  7. The shell ev ...[truncated 667 chars]
Remediation
View remediation

Remediation Suggestions

Replace the shell invocation with an argument-vector API that does not perform shell parsing:

python
import subprocess

if sys.platform == "darwin":
    subprocess.run(["open", str(filepath)], check=False)

Additional hardening measures:

  1. Avoid os.system(), shell=True, and string-built shell commands for all path handling.
  2. Resolve the requested output directory and, where appropriate, restrict it to an approved workspace root.
  3. Reject output paths containing NUL characters and handle path errors explicitly.
  4. Consider making automatic opening opt-in rather than executing it after every successful download.
  5. Add a regression test using download paths containing spaces, quotes, dollar signs, parentheses, and command-substitution syntax; verify that no secondary command is executed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
## Execution (Recommended: Python CLI Tool)

A Python CLI tool is provided at `~/.claude/skills/seedance-2-0-video/seedance.py` for robust execution with proper error handling, automatic retries, and local image base64 conversion. **Prefer using this tool over raw curl commands.**

### Quick Examples with Python CLI

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
## Execution (Recommended: Python CLI Tool)

A Python CLI tool is provided at `~/.claude/skills/seedance-2-0-video/seedance.py` for robust execution with proper error handling, automatic retries, and local image base64 conversion. **Prefer using this tool over raw curl commands.**

### Quick Examples with Python CLI

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

With image URL:

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

With image URL:

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 170)May include surrounding context.

With image URL:

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 307)May include surrounding context.

With image URL:

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

bash
echo "Waiting for video generation to complete..."
while true; do
  STATUS_RESULT=$(curl -s -X GET "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks/${TASK_ID}" \
    -H "Authorization: Bearer $ARK_API_KEY")

  STATUS=$(echo "$STATUS_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 263)May include surrounding context.

Query Task Status

bash
curl -s -X GET "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks/${TASK_ID}" \
  -H "Authorization: Bearer $ARK_API_KEY" | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 271)May include surrounding context.

bash
# List all tasks (paginated)
curl -s -X GET "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks?page_num=1&page_size=10" \
  -H "Authorization: Bearer $ARK_API_KEY" | python3 -m json.tool

# Filter by status

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 275)May include surrounding context.

-H "Authorization: Bearer $ARK_API_KEY" | python3 -m json.tool

Filter by status

curl -s -X GET "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks?page_num=1&page_size=10&filter.status=succeeded"
-H "Authorization: Bearer $ARK_API_KEY" | python3 -m json.tool

text

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 282)May include surrounding context.

Cancel or Delete Task

bash
curl -s -X DELETE "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks/${TASK_ID}" \
  -H "Authorization: Bearer $ARK_API_KEY"

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
91% confidence
Finding

The code invokes a shell via os.system() using a path derived from user-supplied --download input. Although the filename itself is generated internally, shell invocation is unnecessary and can become dangerous if the path contains shell-special characters or if opening arbitrary downloaded content triggers unsafe local handlers. In this skill context, auto-opening files is unrelated to core task execution and increases local side-effect risk.

Content

Scanner excerpt · seedance.py (reported line 255)May include surrounding context.

python
# Open on macOS
                    if sys.platform == "darwin":
                        os.system(f'open "{filepath}"')
                except Exception as e:
                    print(f"Download failed: {e}", file=sys.stderr)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The skill clearly instructs use of shell, network, environment variables, and local file writes, but it declares no explicit tool scope or permissions. That creates an authorization gap: an agent may invoke powerful capabilities not transparently constrained by metadata, increasing the chance of over-privileged execution or unsafe approval flows.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The skill is explicitly designed to transmit user prompts, image inputs, and possibly base64-encoded local images to an external third-party API. This is a real data egress risk because local files and user content leave the host environment and are sent to a remote service.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
## Execution (Recommended: Python CLI Tool)

A Python CLI tool is provided at `~/.claude/skills/seedance-2-0-video/seedance.py` for robust execution with proper error handling, automatic retries, and local image base64 conversion. **Prefer using this tool over raw curl commands.**

### Quick Examples with Python CLI

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The workflow waits for completion and downloads artifacts into a persistent workspace directory, causing generated outputs to remain on disk beyond the current session. Persistent storage is risky when prompts or media contain private, regulated, or proprietary content.

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

Quick Examples with Python CLI

bash
# Text-to-video (create + wait + download)
python3 ~/.claude/skills/seedance-2-0-video/seedance.py create \
  --prompt "超写实特写:一只橘白色相间的英国短毛小猫,趴在米白色亚麻沙发上,慵懒地对着镜头打了一个大大的哈欠,露出粉色的小舌头和尖尖的乳牙。窗外是柔和的午后自然光,从侧面洒在小猫的绒毛上,毛发根根分明。背景虚化为暖色调的室内环境,有模糊的绿色盆栽。镜头固定,焦点始终在小猫脸上,画面温馨治愈。" \
  --wait --download ~\\.openclaw\\workspace\\files

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The workflow waits for completion and downloads artifacts into a persistent workspace directory, causing generated outputs to remain on disk beyond the current session. Persistent storage is risky when prompts or media contain private, regulated, or proprietary content.

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

Quick Examples with Python CLI

bash
# Text-to-video (create + wait + download)
python3 ~/.claude/skills/seedance-2-0-video/seedance.py create \
  --prompt "超写实特写:一只橘白色相间的英国短毛小猫,趴在米白色亚麻沙发上,慵懒地对着镜头打了一个大大的哈欠,露出粉色的小舌头和尖尖的乳牙。窗外是柔和的午后自然光,从侧面洒在小猫的绒毛上,毛发根根分明。背景虚化为暖色调的室内环境,有模糊的绿色盆栽。镜头固定,焦点始终在小猫脸上,画面温馨治愈。" \
  --wait --download ~\\.openclaw\\workspace\\files

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This section sends prompt text and an external image URL to a third-party API. Even though this is intended functionality, it is still a true external transmission finding because user-provided content and references are disclosed to an outside service.

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

With image URL:

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This variant base64-encodes a local image and embeds it directly in the outbound API request, causing raw local file contents to be exfiltrated to the remote service. That raises the sensitivity above ordinary prompt transmission because local user files are being read and sent off-host.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

md
IMG_BASE64=$(base64 < "$IMG_PATH" | tr -d '\n')
IMG_DATA_URL="data:image/${IMG_EXT_LOWER};base64,${IMG_BASE64}"

TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This mode transmits prompt text plus first/last frame image URLs to the third-party API. The context makes the transfer expected, but it is still a genuine egress path for potentially sensitive image references and creative content.

Content

Scanner excerpt · SKILL.md (reported line 170)May include surrounding context.

Requires two images.

bash
TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs downloading generated videos directly to the local filesystem, but it does not prominently warn that generated media may contain sensitive prompts, personal imagery, or untrusted content. This can cause privacy leakage, unsafe local persistence, or accidental exposure through shared folders and later processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented DELETE operation can remove queued tasks or delete completed task history, but the warning about irreversibility is easy to miss and not enforced as a confirmation step. An agent following this skill could destroy user task history or artifacts without adequately surfacing the consequence.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

Draft generation also sends user content to the remote API, so the egress risk remains even if the output is lower cost or lower resolution. Users may wrongly assume draft mode is local or lower risk unless clearly warned otherwise.

Content

Scanner excerpt · SKILL.md (reported line 307)May include surrounding context.

bash
# Step 1: Create draft
DRAFT_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The finalization call transmits a draft task identifier to the external provider, which is less sensitive than uploading raw local files but still constitutes an external API interaction tied to user work product. The direct privacy impact is lower, yet it remains part of the same third-party processing chain.

Content

Scanner excerpt · SKILL.md (reported line 321)May include surrounding context.

md
DRAFT_TASK_ID=$(echo "$DRAFT_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")

# Step 2: After draft succeeds, generate final video from draft
FINAL_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The long-video workflow saves multiple MP4s, PNG last frames, and a manifest file, which increases the volume and lifetime of stored artifacts. This broadens exposure because intermediate frames and metadata can reveal more than the final intended deliverable.

Content

Scanner excerpt · SKILL.md (reported line 435)May include surrounding context.

bash
# 第 1 段
python3 ~/.claude/skills/seedance-2-0-video/seedance.py create \
  --prompt "开场白,展示品牌Logo" \
  --duration 5 --return-last-frame true --wait --download "~\\.openclaw\\workspace\\files\\video"

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The long-video workflow saves multiple MP4s, PNG last frames, and a manifest file, which increases the volume and lifetime of stored artifacts. This broadens exposure because intermediate frames and metadata can reveal more than the final intended deliverable.

Content

Scanner excerpt · SKILL.md (reported line 435)May include surrounding context.

bash
# 第 1 段
python3 ~/.claude/skills/seedance-2-0-video/seedance.py create \
  --prompt "开场白,展示品牌Logo" \
  --duration 5 --return-last-frame true --wait --download "~\\.openclaw\\workspace\\files\\video"