Back to skill

Security audit

hehe-ddc

Security checks for vulnerabilities and agentic risk

Overview

This video-generation skill is mostly coherent, but it uses external TTS/BGM services and default cross-filesystem copying with weak output-path controls that users should review before installing.

Install only if you are comfortable with Chinese-language video workflows that call external TTS services, download audio from the internet, and may copy generated videos to a mounted Windows directory. Use a virtual environment, pin dependencies, disable internet BGM and Windows copying unless needed, and restrict output names to simple .mp4 filenames inside the skill output folder.

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 (2)

T08 · Insecure Dependencies

Warning
Location
docs/INSTALL.md:46
Finding

Unpinned Third-Party Dependencies Permit Supply-Chain Drift

Content
View full analysis

Vulnerability Details

File Location: docs/INSTALL.md:46-48
Vulnerability Type: Unpinned third-party package installation
Risk Level: Medium

Vulnerable Code

bash
pip3 install edge-tts aiohttp requests

Technical Analysis

The installation instructions retrieve the latest available versions of edge-tts, aiohttp, and requests without version constraints or cryptographic hashes. Consequently, the code installed by users can differ from the code available when the Skill was audited.

Python packages may execute installation or build logic during installation, and their imported modules execute with the privileges of the user running the Skill. If a dependency or one of its transitive dependencies is compromised, a user following these instructions may install and execute malicious code.

This is a supply-chain hardening issue rather than evidence that the currently named packages are malicious.

Attack Path

  1. An attacker compromises a listed package, a transitive dependency, or the corresponding package-distribution account.
  2. The attacker publishes a malicious release under the legitimate package name.
  3. A user follows docs/INSTALL.md and runs the unpinned pip3 install command.
  4. Package resolution selects the attacker-controlled release.
  5. Malicious installation or runtime code executes with the privileges of the installing user.
  6. The malicious package can access files, network resources, and credentials available to that user.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user installing or running the Skill. The affected scope may include the user's files, environment variables, accessible credentials, network access, and generated media. If the installation command is run from a privileged environment, the impact would increase accordingly.

Remediation
View remediation

Remediation Suggestions

  1. Define reviewed, exact dependency versions in a dedicated requirements file:

    text
    edge-tts==REVIEWED_VERSION
    aiohttp==REVIEWED_VERSION
    requests==REVIEWED_VERSION
    
  2. Generate and verify cryptographic hashes for every direct and transitive dependency.

  3. Install packages with hash enforcement:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  4. Use a lock-file tool such as pip-tools to resolve and pin the full transitive dependency graph.

  5. Periodically update dependencies through a controlled review process that includes vulnerability scanning and regression testing.

  6. Recommend installation in a dedicated virtual environment under a non-privileged account.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate.py:543
Finding

Unvalidated Output Path Permits Directory Escape and File Overwrite

Content
View full analysis

Vulnerability Details

File Locations: scripts/generate.py:51, scripts/generate.py:443-464, and scripts/generate.py:543
Vulnerability Type: Path traversal and unsafe output-file handling
Risk Level: Medium

Vulnerable Code

The output argument accepts an unrestricted string:

python
parser.add_argument("--output", type=str, default="video.mp4", help="输出文件路径")

The supplied value is joined to the intended output directory without normalization or containment validation:

python
output_file = SKILL_DIR / "output" / args.output

FFmpeg is then invoked with overwrite mode enabled:

python
cmd = [
    "ffmpeg", "-y",
    "-f", "concat", "-safe", "0", "-i", str(list_file),
    "-i", str(audio_file),
    "-vf", subtitle_filter,
    "-c:v", "libx264", "-preset", "medium", "-crf", "20",
    "-pix_fmt", "yuv420p",
    "-c:a", "aac", "-b:a", "128k", "-movflags", "+faststart",
    str(output_file)
]

try:
    subprocess.run(cmd, check=True, capture_output=True, text=True)

Technical Analysis

pathlib.Path does not automatically enforce directory containment. A value such as ../../target.mp4 resolves outside the intended output directory. If args.output is an absolute path, joining it to SKILL_DIR / "output" results in the absolute path taking precedence.

The FFmpeg command includes -y, which permits replacement of an existing destination without prompting. Therefore, an attacker who can influence command-line arguments can direct generated media to an arbitrary user-writable path.

This issue is not shell-command injection: subprocess arguments are passed as a list and shell=True is not used. The vulnerability is specifically unsafe filesystem path handling. Practical overwrite targets are constrained by FFmpeg's ability to create an output in the requested format and by the running user's filesystem permissions.

Attack Path

  1. An attacker ...[truncated 1123 chars]
Remediation
View remediation

Remediation Suggestions

  1. Restrict --output to a filename rather than an arbitrary path.

  2. Reject absolute paths, parent-directory components, and unsupported suffixes.

  3. Resolve the destination and verify containment before invoking FFmpeg:

    python
    OUTPUT_DIR = (SKILL_DIR / "output").resolve()
    
    requested = Path(args.output)
    if requested.is_absolute() or requested.name != str(requested):
        raise ValueError("--output must be a filename without directory components")
    if requested.suffix.lower() != ".mp4":
        raise ValueError("--output must use the .mp4 extension")
    
    output_file = (OUTPUT_DIR / requested.name).resolve()
    if output_file.parent != OUTPUT_DIR:
        raise ValueError("Output path escapes the permitted output directory")
    
  4. Consider refusing to overwrite existing files by removing -y or by requiring an explicit, separately validated overwrite option.

  5. Generate temporary output using a securely created file in OUTPUT_DIR, then atomically rename it after successful rendering.

  6. Run rendering under a least-privileged account with write access limited to the designated output directory.

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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose focuses on video generation features, but the skill also documents external command execution, network retrieval of audio, and automatic copying of generated files to a Windows path. This mismatch is dangerous because users and policy engines may underestimate the operational reach of the skill, enabling unexpected data egress, execution of external binaries, or writes into sensitive host-mounted locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README describes network-based BGM sourcing and cloud/network TTS behavior without a user-facing notice that text, metadata, or downloaded media may traverse third-party services. In a content-generation skill, user-provided captions and assets may be sensitive or proprietary, so silent network use increases privacy, compliance, and supply-chain risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documentation describes capabilities that imply shell execution, file reads/writes, copying files to another filesystem path, and network access, but it declares no explicit tool scope or permissions. This weakens sandboxing and informed consent because a host may grant broader access than users expect, especially for a skill that invokes external tools and touches cross-environment paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The section describing internet BGM downloads says music can be downloaded from Pixabay but does not clearly warn that enabling this feature sends outbound requests to an external service. In a content-generation workflow, that can expose IP address, timing, user-agent, and possibly request-derived metadata without explicit user awareness, which is a privacy and compliance issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The primary natural-language description is entirely in Chinese, with no indication that the skill supports language choice or that it is intentionally limited to a Chinese-speaking or region-specific audience. That can violate language/locale policy if the skill is presented in environments where users are not given an explicit language opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language strings in the configuration indicate the skill is configured around Chinese-language content and output, including Chinese comments and a fixed Chinese promotional script. There is no indication that users can choose a different language or that the locale restriction is documented as an intentional, region-specific requirement.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · docs/INSTALL.md (reported line 54)May include surrounding context.

bash
# Ubuntu/Debian
sudo apt-get install ffmpeg

# 验证
ffmpeg -version

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · docs/INSTALL.md (reported line 189)May include surrounding context.

bash
# Ubuntu/Debian
sudo apt-get install ffmpeg

# 验证
ffmpeg -version

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · docs/INSTALL.md (reported line 67)May include surrounding context.

1. 检查技能文件

bash
ls -la /home/openclaw/.openclaw/workspace/skills/video-auto/

应包含:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide tells users to run the generator without clearly warning that execution may trigger network-dependent TTS/BGM requests and automatic copying of output files to another mounted filesystem. Lack of informed consent is dangerous in agent skill contexts because users may expect a local media transform but instead initiate external data transfers and unintended file writes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The installation document reveals additional runtime behaviors beyond simple local video generation: downloading network BGM, falling back to Baidu TTS, and copying output to a Windows-mounted path. These are not inherently malicious, but they expand the skill's trust boundary to external services and another filesystem location without prominent up-front disclosure, which can surprise users and lead to unintended data movement or network access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions and examples require Chinese copy (你的文案, 文案规范) and recommend only Chinese TTS voices such as zh-CN-YunxiNeural and zh-CN-XiaoxiaoNeural. There is no indication that users may choose another language or that the skill is intentionally limited to a China-specific use case, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation states that the skill downloads BGM from the internet and uses external TTS services, but it does not prominently warn that user content may be transmitted over the network. Because scripts, captions, or metadata may contain sensitive marketing or business information, undisclosed network egress creates privacy and compliance risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide advertises automatic copying of generated videos to a Windows-mounted path, which can cause unintended cross-filesystem writes outside the immediate working directory. In agent or automated environments, this increases the risk of data being written to user desktop locations or shared mounts without sufficiently explicit consent or warning.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The available voice map is restricted to zh-CN voices, and elsewhere the fallback TTS request also fixes the language to Chinese. This enforces a specific language/locale behavior on users without any documented choice, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 82)May include surrounding context.

python
"-of", "default=noprint_wrappers=1:nokey=1",
        str(audio_file)
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    return float(result.stdout.strip())

async def generate_tts_baidu(text, output_file, speed=5):

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This network TTS path explicitly sets the generated speech language to Chinese regardless of user preference. Because no alternative language option or opt-in is provided, this is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 119)May include surrounding context.

python
try:
        print(f"🎤 正在生成 Edge TTS 配音 ({voice}声)...")
        subprocess.run(cmd, check=True, capture_output=True, text=True, timeout=30)
        if output_file.exists():
            print(f"✅ Edge TTS 生成成功:{output_file} ({voice}声)")
            duration = get_audio_duration(output_file)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill fetches external audio from the internet even though its primary function is local image/text-to-video generation. This expands the trust boundary: remote content can be introduced into the workflow, written to disk, and then parsed by ffmpeg, creating supply-chain, privacy, and malformed-media attack exposure beyond the advertised core behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 317)May include surrounding context.

python
str(output_file)
        ]
        try:
            subprocess.run(cmd, check=True, capture_output=True, text=True)
            if output_file.exists():
                actual_duration = get_audio_duration(output_file)
                print(f"✅ BGM 裁剪完成:{actual_duration:.2f}秒")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 345)May include surrounding context.

python
str(output_file)
        ]
        try:
            subprocess.run(cmd, check=True, capture_output=True, text=True)
            if output_file.exists():
                actual_duration = get_audio_duration(output_file)
                print(f"✅ BGM 裁剪完成:{actual_duration:.2f}秒")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 464)May include surrounding context.

python
str(output_file)
        ]
        try:
            subprocess.run(cmd, check=True, capture_output=True, text=True)
            if output_file.exists():
                actual_duration = get_audio_duration(output_file)
                print(f"✅ BGM 裁剪完成:{actual_duration:.2f}秒")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate.py (reported line 415)May include surrounding context.

python
"-q:v", "2",
            str(output_img)
        ]
        subprocess.run(cmd, capture_output=True, check=True)
    
    list_file = SKILL_DIR / "images_list.txt"
    with open(list_file, 'w') as f:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code automatically copies generated output to an external Windows desktop path unrelated to the core generation task. This creates unintended data exfiltration or data propagation risk, especially in shared or automated environments, because user content is moved to another filesystem location without strong necessity or explicit per-run consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file documents output locations, including a Windows copy target, but does not explicitly warn users that running the skill will create or overwrite files in those locations. For markdown files, user-facing documentation should disclose behaviors that affect user data or the filesystem.

Content

No source excerpt is available for this finding.