Back to skill

Security audit

seedance2-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Seedance video tool, but it needs review because its bundled downloader can execute unintended commands on macOS and its external media/API use is broadly scoped.

Review before installing. Use only with prompts and media you are comfortable sending to Volcengine Ark, avoid internal callback URLs, and do not use the --download option with untrusted or unusual paths on macOS unless the os.system open behavior is removed or fixed.

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
scripts/seedance.py:267
Finding

Arbitrary Command Execution Through an Unescaped Download Path on macOS

Content
View full analysis

Vulnerability Details

File Location: scripts/seedance.py, lines 267–278
Vulnerability Type: OS command injection
Risk Level: High
Affected Platform: macOS

Vulnerable Code

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}")

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

Technical Analysis

The --download command-line argument controls download_dir, which is incorporated into filepath. After a successful video download on macOS, the application interpolates this path directly into a command passed to os.system().

os.system() invokes a command shell. Enclosing the path in double quotes does not make it safe because command substitutions such as $() and backticks are still evaluated inside double-quoted shell strings. Embedded quote characters can also terminate the intended quoted argument and introduce additional shell syntax.

Consequently, a download directory containing shell syntax can cause arbitrary commands to execute when the generated video is opened. No shell is required for this operation because the open utility can receive the path as a discrete argument through a subprocess API.

Attack Path

  1. An attacker supplies, or persuades the Agent to use, a malicious value for the --download argument.
  2. The Agent invokes either create --wait --download ... or wait --download ... on macOS.
  3. The application creates the attacker-controlled directory and waits for a valid generation task to succeed.
  4. The generated video is downloaded into the crafted path.

...[truncated 981 chars]

Remediation
View remediation

Remediation Suggestions

Eliminate the shell invocation and pass the executable and file path as separate arguments:

python
import subprocess

if sys.platform == "darwin":
    try:
        subprocess.run(
            ["open", str(filepath)],
            check=False,
            shell=False,
        )
    except OSError as exc:
        print(f"Unable to open downloaded video: {exc}", file=sys.stderr)

Additional hardening measures should include:

  1. Never use shell=True or os.system() for opening downloaded files.
  2. Validate that the destination resolves to an intended user-approved directory.
  3. Reject unexpected control characters, including null bytes and line breaks, in externally supplied paths.
  4. Continue treating the path as one opaque argument rather than attempting manual shell escaping.
  5. Add regression tests using paths containing spaces, quotes, semicolons, backticks, and literal $() sequences to verify that none are interpreted as shell syntax.
  6. Consider making automatic opening opt-in through a separate flag so downloading a file does not implicitly launch another local program.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
Findings (20)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

md
- Do camera work and visuals match? What to fix? How many rounds?
- **Has this prompt passed the creativity gate?** If not, scrap and redo
- When to converge? Output multiple versions?
- Generate via API or output prompt for user to manually use on the platform?

**Whether to do each step, how many rounds, what order — all up to you.**

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The code invokes a shell via os.system() using a file path embedded in a formatted string. Although the path is locally constructed, it is derived in part from a user-controlled download directory, and shell invocation is unnecessary here; this creates avoidable command-injection and unintended-execution risk on macOS.

Content

Scanner excerpt · scripts/seedance.py (reported line 278)May include surrounding context.

python
print(f"Saved to: {filepath}")

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README instructs users to provide prompts, images, videos, audio, and callback URLs to the CLI, but does not clearly warn that this data may be transmitted to Volcengine's external API service. This creates a privacy and informed-consent risk because users or host agents may forward sensitive media, prompts, or internal webhook endpoints off-platform without realizing it.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 53)May include surrounding context.

bash
# Text-to-video
python3 scripts/seedance.py create --prompt "A man in black running through a crowded market" --ratio 16:9 --duration 5 --wait --download ~/Desktop

# Image-to-video
python3 scripts/seedance.py create --prompt "The character slowly turns around" --image photo.jpg --ratio adaptive --wait --download ~/Desktop

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states that both English and Chinese skill documents produce Chinese prompts because Seedance works best with Chinese input. This directs output language behavior toward a specific language without presenting it as a user choice or opt-in preference.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README states the skill auto-loads on broad phrases like "video generation", "AI video", and similar generic requests. In agent platforms that support automatic skill activation, this can cause the skill to engage on unrelated user requests and route prompts or files to an external video API without clear user intent, increasing the chance of unintended data disclosure or inappropriate tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README encourages sending local images, videos, audio, and optional callback URLs to an external API without warning that media content, embedded metadata, and callback endpoints will be transmitted off-host. This can lead users to upload sensitive files or expose internal webhook URLs without understanding the privacy and network implications.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README_zh.md (reported line 53)May include surrounding context.

bash
# 文本生成视频
python3 scripts/seedance.py create --prompt "镜头跟随黑衣男子快速逃亡,后面一群人在追" --ratio 16:9 --duration 5 --wait --download ~/Desktop

# 图片生成视频
python3 scripts/seedance.py create --prompt "画面中的人物缓缓转身" --image photo.jpg --ratio adaptive --wait --download ~/Desktop

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README_zh.md (reported line 53)May include surrounding context.

bash
# 文本生成视频
python3 scripts/seedance.py create --prompt "镜头跟随黑衣男子快速逃亡,后面一群人在追" --ratio 16:9 --duration 5 --wait --download ~/Desktop

# 图片生成视频
python3 scripts/seedance.py create --prompt "画面中的人物缓缓转身" --image photo.jpg --ratio adaptive --wait --download ~/Desktop

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented auto-load triggers are broad terms like product and task keywords, which may match ordinary conversation and cause the skill to load unexpectedly. In agent platforms, unintended loading can expand the model's available instructions/tools and lead to unplanned external API use or data exposure during routine chats.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction says all final prompts must always be in Chinese, regardless of the user's language. This is a language/locale constraint imposed unconditionally, which matches the policy-violation category because it does not offer user choice or opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

触发词中包含“视频生成”“AI视频”“运镜”“短剧”“广告视频”等较宽泛表达,容易在普通创作或讨论场景下误触发该技能。误触发后,技能会进入具备搜索、图像分析和 API 生成能力的流程,增加非预期外部调用和数据处理的风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

技能说明明确允许自主进行 web_search、图片诊断/裁剪,以及调用 scripts/seedance.py 发起外部 API 生成,但没有要求在执行前取得用户明确同意或告知将上传哪些数据。由于输入可能包含用户图片、视频、音频和文本,这会导致敏感内容在未经充分授权的情况下被搜索、处理或发送到第三方服务。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document is entirely written as a Chinese-language reference manual and points users to Chinese-language companion materials, but does not indicate that other languages are supported or that Chinese is a justified region-specific requirement. Under the policy, forcing a specific language without opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The reference includes a video-editing example that depicts pushing a woman off a bridge, which is safety-sensitive harmful content. The surrounding markdown presents it as a normal reusable template and does not include any warning, restriction, or caution about generating violent scenes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI reads local images, video, audio, and prompt content, then sends them in HTTP requests to the Volcengine Ark service. While the file mentions the API and usage, it does not clearly warn users in code comments or runtime output that local file contents and prompts will be uploaded to a remote service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Automatically opening the downloaded media is behavior beyond the tool's core requirement of creating/downloading videos. In a skill/agent context, unexpected local program launch increases user-risk surface and may trigger unsafe file handling or social-engineering scenarios, especially when the download originates from remote content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README tells users to place a live API key in an environment variable but gives no guidance on secret handling, shell history, process exposure, or avoiding accidental commits/logging. In an agent/tooling context, users may copy these commands into shared environments, increasing the chance that credentials are leaked and later abused for unauthorized API use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

L064 规定“提示词必须中文”,属于自然语言层面的语言策略限制。文档中未说明这是用户可选项,也未给出区域合规等必要理由,因此构成强制特定语言的策略问题。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

When --download is used, the script creates directories and writes an output video file locally. Although it prints the destination path at download time, there is no prior warning in the code comments or command help that using this option will create directories and save files on disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.