Back to skill

Security audit

Douyin Video Forge

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Douyin video-production purpose, but it grants broad browser, shell, download, API, and scheduled-task authority without enough scoping or user control.

Install only if you are comfortable with a skill that can browse Douyin, download public videos, run yt-dlp and FFmpeg locally, call the Kling API using environment credentials, and create recurring OpenClaw jobs. Before using it, require explicit confirmation before downloads, API calls, and scheduling; avoid feeding untrusted text directly into shell commands; prefer local files over arbitrary URLs; and review or disable the cron workflow unless unattended generation is truly intended.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:408
Finding

Shell Command Injection Through Direct Placeholder Interpolation

Content
View full analysis
" \ --duration 10 --aspect-ratio 9:16 --mode pro ``` Related command templates include: ```bash yt-dlp --no-warnings -f best --no-playlist -o "$TMPDIR/%(id)s.%(ext)s" "<视频链接>" ``` ```bash python3 ~/.openclaw/skills/douyin-video-forge/scripts/kling_api.py generate-with-image \ --prompt "<当前段落的可灵Prompt>" \ --image "<上一段最后一帧图片路径>" \ --duration 10 --aspect-ratio 9:16 --mode pro ``` ### Technical Analysis The Skill tells the agent to substitute generated prompts, externally sourced video URLs, and file paths directly into shell command templates. Enclosing a placeholder in double quotes is not sufficient if substitution occurs while constructing a shell command string. Shell metacharacters such as command substitution expressions remain dangerous if they become part of the final command before shell parsing. The prompt is particularly exposed because it may contain data derived from user briefs, public video titles, comments, search results, or other externally controlled content. A malicious value containing a quote followed by shell syntax could terminate the intended argument and introduce another command. The Python CLI itself uses `argparse` safely, but that protection applies only after the shell has parsed the command. It does not mitigate injection in the agent-generated shell command. ### Attack Path 1. An attacker supplies a project brief, reference title, video URL, product description, or other source text containing shell metacharacters. 2. The content is carried into a Kling prompt or substituted into the `yt-dlp` command. 3. The a ...[truncated 1170 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/kling_api.py:110
Finding

Server-Side Request Forgery Through Unrestricted Video URL Retrieval

Content
View full analysis
str: """如果是 URL 则下载到临时文件,否则原样返回路径。""" if path_or_url.startswith(("http://", "https://")): tmpdir = tempfile.mkdtemp(prefix="kling_") local_path = os.path.join(tmpdir, "downloaded.mp4") with httpx.Client(timeout=httpx.Timeout(120.0), follow_redirects=True) as client: resp = client.get(path_or_url) resp.raise_for_status() with open(local_path, "wb") as f: f.write(resp.content) return local_path return path_or_url ``` ### Technical Analysis The `extract-frame` command accepts an arbitrary HTTP or HTTPS URL and retrieves it using the network privileges of the local agent. The implementation has no restrictions on: - Destination hostname. - Resolved IP address. - Loopback, private, link-local, or cloud metadata ranges. - Redirect destinations. - Response content type. - Maximum response size. - Whether DNS resolution changes between validation and connection. Because `follow_redirects=True` is enabled, even an initially trusted-looking URL can redirect to an internal endpoint. The complete response is also loaded into memory through `resp.content` before being written, permitting memory exhaustion from a sufficiently large response. The downloaded data is subsequently parsed by `ffprobe` or `ffmpeg`, increasing the exposure of local media parsers to attacker-controlled content. ### Attack Path 1. An attacker causes the agent to execute: ```bash python3 scripts/kling_api.py extract-frame --video "http://attacker-controlled-or-internal-host/..." --position last ``` 2. The script performs the request from the OpenClaw host. 3. The supplied server may redirect t ...[truncated 1057 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
SKILL.md:488
Finding

Automatic Creation of Persistent Cron Tasks Without a Dedicated Scheduling Confirmation

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
install.sh:29
Finding

Unpinned Python Dependency Installation Guidance

Content
View full analysis
/dev/null; then success "pyjwt + httpx 已安装" else warn "pyjwt/httpx 未安装 — Kling API 视频生成需要这两个包" info "安装: pip install pyjwt httpx" fi # 检查 faster-whisper(语音转写需要) if python3 -c "import faster_whisper" 2>/dev/null; then success "faster-whisper 已安装" else info "faster-whisper 未安装(可选,语音转写需要)— pip install faster-whisper" fi ``` The same unpinned installation pattern is repeated in `README.md` and `PRD.md`, including `pip install --upgrade yt-dlp`. ### Technical Analysis The installer does not automatically execute the `pip install` commands, but it directs users to install dependencies without version constraints, lock files, hash verification, or an isolated environment. Consequently, the effective dependency set changes over time and is not identical to the package set reviewed during the audit. Even when the named top-level packages are legitimate, their future versions and transitive dependencies are outside this repository's control. Global installation can also alter packages used by unrelated applications. This is a supply-chain hardening issue rather than evidence that a malicious or typosquatted package is currently specified. The package names shown are consistent with the code imports. ### Attack Path 1. A user follows the installation guidance and runs an unpinned `pip install` command. 2. Pip resolves the latest available top-level and transitive package versions at that time. 3. A compromised release, malicious transitive update, or incompatible future version is selected. 4. Package installation code executes with the privileges used to run pip. 5. The installed code is later imported by `kling_api.py` or `transcribe.py`. ### Impact Assessment If the package suppl ...[truncated 421 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (34)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document claims browser access follows robots.txt and platform terms, yet elsewhere proposes anti-detection and CAPTCHA-avoidance features that are fundamentally inconsistent with those claims. This contradiction is dangerous because it normalizes deceptive compliance language while planning functionality commonly used to circumvent access controls, creating legal, abuse, and trust risks.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

卸载

bash
rm -rf ~/.openclaw/skills/douyin-video-forge

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

卸载

bash
rm -rf ~/.openclaw/skills/douyin-video-forge

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

该代码块的核心功能非常明确:围绕 Kling API 做认证、发起视频生成请求、轮询任务状态、检查网络连通性,并使用 ffmpeg/ffprobe 提取视频帧。这与声明中的“抖音短视频全链路自动化制作”存在明显范围和目的差异。声明强调的是抖音数据采集、热点分析、内容策划、脚本生成、以及最终成片拼接;而代码没有任何浏览器自动化、抖音站点访问、热榜抓取、脚本策划逻辑或拼接逻辑。相反,它提供了一个较窄但具体的‘可灵视频生成 CLI’实现,还额外包含帧提取功能。故描述未准确代表该代码实际行为,属于实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个面向抖音短视频生产的自动化系统,核心能力应包括浏览器采集抖音数据、热点分析、脚本生成、视频生成与拼接。而实际代码只是一个独立的语音转写 CLI:读取本地音频文件,加载 faster-whisper 模型,执行转写,并将文本及时间分段以 JSON 输出。两者在主要用途、功能范围和处理对象上均明显不一致。代码既没有访问抖音,也没有进行浏览器自动化、趋势分析、视频生成或拼接,因此属于明显的描述与行为不匹配。

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · install.sh (reported line 56)May include surrounding context.

sh
fi
cp -R "$SCRIPT_DIR" "$SKILL_DIR"
# 清理安装目录中不需要的文件
rm -rf "$SKILL_DIR/.git" "$SKILL_DIR/.env" "$SKILL_DIR/.DS_Store"
rm -rf "$SKILL_DIR/mcp_server"
success "已安装到 $SKILL_DIR"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · install.sh (reported line 56)May include surrounding context.

sh
fi
cp -R "$SCRIPT_DIR" "$SKILL_DIR"
# 清理安装目录中不需要的文件
rm -rf "$SKILL_DIR/.git" "$SKILL_DIR/.env" "$SKILL_DIR/.DS_Store"
rm -rf "$SKILL_DIR/mcp_server"
success "已安装到 $SKILL_DIR"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · install.sh (reported line 57)May include surrounding context.

sh
cp -R "$SCRIPT_DIR" "$SKILL_DIR"
# 清理安装目录中不需要的文件
rm -rf "$SKILL_DIR/.git" "$SKILL_DIR/.env" "$SKILL_DIR/.DS_Store"
rm -rf "$SKILL_DIR/mcp_server"
success "已安装到 $SKILL_DIR"

# --- 4. 完成 ---

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The line states that all user-visible text must use Chinese, which imposes a fixed language policy. The provided guidance does not mention any user opt-in, language selection, or region-specific justification, so this is a natural-language policy violation under the locale rule.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The PRD explicitly includes anti-detection measures such as Camoufox, fingerprint randomization, proxy rotation, cookie pools, and automated CAPTCHA handling. These capabilities are not necessary for ordinary short-video production and materially increase the skill’s ability to evade platform defenses, enabling abusive scraping or account misuse beyond the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The model comparison table is framed specifically around '中文准确率', and the overall PRD is written as a Chinese-only product specification without any indication that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README describes automated browser collection, video downloading, transcription, and video generation, but does not prominently warn users about privacy implications, network access, storage use, or CPU/GPU consumption. In an agent skill, lack of clear disclosure can lead users to approve or trigger actions without understanding that external sites will be visited and local resources heavily consumed.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The example trigger phrases are broad, natural-language requests that closely resemble ordinary user conversations, increasing the chance the skill is invoked unintentionally. In an agent context, accidental invocation can cause automated browsing, data collection, downloads, and media-generation actions without a sufficiently explicit user intent boundary.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell commands, accesses environment variables, and uses networked tools/APIs, but it declares no explicit tool scope or permission boundaries. That increases the chance an agent will execute high-impact actions without clear user visibility or platform enforcement, especially because the skill includes downloading media, invoking Python scripts, and handling API credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description omits prominent user warnings that it may perform automatic browser scraping, video downloads, external API transmission, transcription, and local scheduled-task creation. Without up-front disclosure, users may unknowingly authorize actions that affect privacy, consume resources, or persist on their system.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The activation logic is broad enough to trigger on many ordinary conversations about videos, marketing, or scripts, increasing the chance the skill will launch browser automation, shell checks, downloads, or API-related workflows unexpectedly. In a skill with external network access and local command execution, overbroad activation raises the probability of unintended sensitive actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs automatic creation/modification of local cron job definitions, which creates persistence on the user's machine beyond the immediate session. Persistent scheduled execution materially increases risk because it can repeatedly trigger browser collection, downloads, API calls, and local file operations without fresh per-run approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The installer unconditionally deletes any existing skill directory at the target path using rm -rf before reinstalling, without prompting the user or verifying the path beyond variable expansion. This is dangerous because it can silently destroy local data, custom modifications, or unrelated files if the directory contents were important or the target path was not what the user expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The installer tells users to invoke the skill with a specific Chinese phrase, and the surrounding user-facing output is entirely in Chinese. This creates a locale/language constraint without any visible opt-in, alternative language phrasing, or documentation that the skill is intentionally restricted to Chinese users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document states that it is core reference material for an LLM Agent generating Douyin content, and the entire skill is written as prescriptive guidance in Chinese for that generation context. This creates a natural-language locale constraint without any indication that the user can choose another language or opt in to Chinese-only output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L032 states '抖音短视频场景首选中文', which prescribes a preferred language based on scenario rather than offering a user-selectable language option. Under the policy, forcing or steering to a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file title and usage description frame the knowledge base entirely in Chinese for generating Douyin scripts, and there is no statement that users may choose another language or locale. Under the policy rule, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guidance states that a single prompt should be 50-150 Chinese characters, which effectively mandates Chinese as the output language. Because the document is framed as instructions for an agent generating Seedance prompts and does not mention user choice or an opt-in mechanism, this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file consists exclusively of Chinese-language instructions and reference material, and the agent guidance does not indicate that users can opt into another language. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language strings and usage instructions exclusively in Chinese, including the module docstring and later CLI help/error text. Under the policy rule, forcing a single language without offering a user choice or documenting a justified locale restriction is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.destructive_delete_command

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
README.md:179