Back to skill

Security audit

多平台生成视频导演

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real video-production helper, but its local media scripts and runtime dependency setup need review before use.

Install only after reviewing the helper scripts or running the skill in a restricted workspace. Avoid sensitive dialogue with the TTS feature, pin dependencies before use, and constrain output paths, durations, colors, and volume values before allowing an agent to run the scripts automatically.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/gen_voice_lines.py:51
Finding

Arbitrary File Write Through TTS Output Name Path Traversal

Content
View full analysis
2 and parts[2] else def_rate pitch = parts[3] if len(parts) > 3 and parts[3] else def_pitch return (name, text, rate, pitch) async def gen(outdir: str, lines, voice: str): os.makedirs(outdir, exist_ok=True) for name, text, rate, pitch in lines: out = os.path.join(outdir, f"{name}.mp3") tts = edge_tts.Communicate(text, voice=voice, rate=rate, pitch=pitch) await tts.save(out) ``` ### Technical Analysis The filename component of each `--voice` argument is accepted without rejecting absolute paths, parent-directory components, or path separators. It is passed directly to `os.path.join()` and then to `edge_tts.save()`. `os.path.join()` does not enforce containment. A value such as `../../target` produces a path outside the intended output directory. An absolute path can also cause the output directory component to be discarded on supported platforms. No canonical-path containment check or symlink protection is applied. The content written is constrained to the MP3 generated by the TTS provider, but the attacker can still select the destination path. ### Attack Path 1. An attacker controls or influences a custom voice argument processed by the Skill. 2. The attacker supplies a name containing traversal components, for example: ```text --voice "../../target:attacker-selected dialogue" ``` 3. `parse_voice_arg()` accepts `../../target` ...[truncated 594 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/stitch_videos.py:93
Finding

FFmpeg Filter-Graph Injection Through Unvalidated Audio Volume Values

Content
View full analysis
1 else "0.42") if not os.path.isfile(f): print(f"Background music file does not exist: {f}"); sys.exit(1) cmd += ["-i", f] voices.append(("bgm", 0, vol)) for v in args.voice: seg = v.split(":", 2) if len(seg) < 2: print(f"--voice format error: {v}"); sys.exit(1) delay, f = int(seg[0]), seg[1] vol = seg[2] if len(seg) > 2 else "1.3" if not os.path.isfile(f): print(f"Voice file does not exist: {f}"); sys.exit(1) cmd += ["-i", f] voices.append((f"a{len(voices)}", delay, vol)) # ... idx = n for label, delay, vol in voices: if label == "bgm": fc.append(f"[{idx}:a]aresample=44100,volume={vol}[bgm]") else: fc.append(f"[{idx}:a]aresample=44100,pan=stereo|c0=c0|c1=c0," f"adelay={delay}|{delay},volume={vol}[{label}]") idx += 1 if voices: ins = "".join(f"[{l}]" for l, _, _ in voices) fc.append(f"{ins}amix=inputs={len(voices)}:duration=longest:normalize=0," f"alimiter=limit=0.95[aout]") cmd += ["-filter_complex", ";".join(fc)] ``` ### Technical Analysis The BGM and voice volume values are treated as arbitrary strings and interpolated directly into FFmpeg's `-filter_complex` expression. Although `subprocess.run()` uses an argument list and therefore avoids shell interpretation, FFmpeg's filter graph is itself an executable expression language. Filter delimiters and option syntax embedded in a crafted volume value may terminate or alter the intended filter and append additional graph operations. At minimum, this permits reliable disruption of the composition process. Depending on the filters c ...[truncated 1215 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/add_subtitles.py:66
Finding

FFmpeg Drawtext Filter Injection Through Arbitrary Color and Incomplete Escaping

Content
View full analysis
str: """Escape special characters in filter parameters.""" return value.replace("\\", "\\\\").replace("'", "\\'").replace(":", "\\:") def color_arg(color: str) -> str: if color.startswith("0x") or color.startswith("0X"): return color[2:] return {"white": "white", "yellow": "yellow", "red": "red"}.get(color, color) def build_filters(titles, subs, font, title_size, title_pos, sub_size, color): fc = [] ty = {"center": "h/2", "top": "h*0.12", "bottom": "h*0.85"}[title_pos] for i, t in enumerate(titles): yoff = i * (title_size + 12) fc.append( f"drawtext=fontfile='{esc(font)}':text='{esc(t)}':" f"fontsize={title_size}:fontcolor={color_arg(color)}:" f"x=(w-text_w)/2:y=({ty})+{yoff}:" f"shadowcolor=black@0.6:shadowx=2:shadowy=2" ) for start, end, text in subs: fc.append( f"drawtext=fontfile='{esc(font)}':text='{esc(text)}':" f"fontsize={sub_size}:fontcolor={color_arg(color)}:" f"box=1:boxcolor=black@0.45:boxborderw=12:" f"x=(w-text_w)/2:y=h-{sub_size + 60}:" f"enable='between(t,{start},{end})'" ) return fc # ... cmd = [FFMPEG, "-y", "-i", args.video, "-vf", ",".join(filters), "-c:a", "copy", "-c:v", "libx264", "-preset", "medium", "-crf", "20", "-movflags", "+faststart", out] ``` ### Technical Analysis The `--color` option is documented as a constrained color field, but unrecognized values are returned unchanged and embedded into an unquoted FFmpeg filter option. A crafted value containing FFmpeg option or filter delimiters can alter parsing of the `drawtext` filter chain. The custom `esc()` function ...[truncated 1275 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
.
Finding

Unbounded Duration Values Permit Memory and CPU Exhaustion

Content
View full analysis
1 else 5.5 out_path = sys.argv[2] if len(sys.argv) > 2 else "bgm.wav" style = sys.argv[3] if len(sys.argv) > 3 else "gentle" # ... rounds = max(1, int(total_sec / (4 * dur_per_note * len(chords))) + 1) parts = [] for i in range(rounds): for j, ch in enumerate(chords): parts.append(chord_arp(ch, dur_per_note, amps[j % len(amps)])) mono = np.concatenate(parts)[: int(SR * total_sec)] # ... stereo = np.stack([left, right], axis=1) pcm = (stereo * 32767).astype(np.int16) with wave.open(out_path, "wb") as f: f.setnchannels(2) f.setsampwidth(2) f.setframerate(SR) f.writeframes(pcm.tobytes()) ``` From `scripts/compose_full_track.py`: ```python def segment(chords, dur_per_note, amps, sec): parts = [] total = 0.0 i = 0 while total < sec: ch = chords[i % len(chords)] parts.append(chord_arp(ch, dur_per_note, amps[i % len(amps)])) total += dur_per_note * len(ch) i += 1 return np.concatenate(parts)[: int(SR * sec)] # ... for item in args.plan.split(","): item = item.strip() if ":" not in item: sys.exit(f"--plan format error: {item}") style, sec = item.rsplit(":", 1) style, sec = style.strip(), float(sec) if style not in STYLES: sys.exit(f"Unknown style: {style}") plan.append((style, sec)) # ... if args.total > 0: target = int(SR * args.total) mono = mono[:target] if len(mono) < target: mono = np.concatenate([mono, np.zeros(target - len(mono))]) ``` ### Technical Analysis The scripts allocat ...[truncated 1437 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:170
Finding

Runtime Installation of Unpinned Third-Party Dependencies

Content
View full analysis
/Scripts/pip install numpy imageio-ffmpeg ``` ```text - Music, mixing, stitching, and subtitle workflows require: numpy and imageio-ffmpeg - Voice generation requires edge-tts - Before first use, run: /Scripts/pip install numpy imageio-ffmpeg edge-tts ``` ### Technical Analysis The Skill instructs the Agent to install packages dynamically without exact versions, hashes, a lockfile, or an explicitly approved package index. Consequently, future executions may install dependency versions and a bundled FFmpeg binary that differ from those considered during this audit. The reviewed package names do not appear to be obvious typosquats, and no suspicious custom package index was specified. The risk arises from non-reproducible resolution and the absence of artifact-integrity controls rather than evidence that the named packages are currently malicious. ### Attack Path 1. The Agent follows the first-use dependency installation instructions. 2. `pip` resolves current package versions and transitive dependencies at execution time. 3. A compromised, unexpectedly changed, or malicious upstream artifact is downloaded. 4. Package installation, import-time code, or a replaced bundled FFmpeg executable runs with the Agent process's permissions. ### Impact Assessment A compromised dependency could execute arbitrary code with all permissions available to the Agent environment, including access to workspace files, media inputs, network connectivity, and generated outputs. The reviewed Skill does not itself establish that such compromise has occurred; this finding concerns preventable supply-chain exposure. ]]>
Remediation
View remediation

other

Note
Location
scripts/gen_voice_lines.py:61
Finding

User Dialogue Is Disclosed to an External TTS Provider Without Explicit Data-Transfer Notice

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This documentation introduces network-dependent TTS generation via edge-tts under a skill presented as a video-generation workflow, without clear permission scoping or strong disclosure. The hidden expansion into external-network audio generation can expose user-provided text to third-party services and broaden the skill's data-handling footprint beyond user expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

该文件实现的是背景音乐/WAV 音频合成:根据时长和风格生成钢琴琶音并写出音频文件,而技能清单描述将范围限定为视频方案、视频生成、分镜、字幕、配乐建议等视频相关处理。这里的代码不仅提供配乐建议,而是直接执行独立的音频生成,与“仅处理视频生成”的范围存在明显偏离。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs use of shell-capable workflows and local Python scripts, but the manifest does not declare any explicit tool scope or allowed-tools restriction. This creates unnecessary authority: an agent may invoke shell or code execution paths beyond what users would expect from a video-generation skill, increasing the risk of unintended file access, package installation, or command execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest explicitly limits the skill to '仅处理视频生成' and says it does not handle adjacent media tasks beyond that scope. However, the documented behavior includes composing background music, generating synthetic voice lines, burning subtitles, and stitching multiple clips into a finished video, which goes beyond generating video or delivering platform-ready prompts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest positions the skill as a video-generation director and directs users to other skills for out-of-scope functionality. Yet this section documents timeline-based stitching, transitions, background music layering, voice placement, and final assembly, which are broader editing/compositing operations rather than just generating video from text/images.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation specifies a fixed locale-specific voice, 'edge-tts 晓晓中文女声', for generated voice lines and presents Chinese utterance examples as the default behavior. This imposes a specific language/locale choice without stating that users may opt into other voices or languages, which is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs package installation and use of a network-dependent TTS dependency (edge-tts) that is not justified by the claimed minimal purpose. Allowing runtime installation and external-service use expands supply-chain and data-exposure risk, especially when paired with undeclared shell/code execution capabilities.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrase is broad enough to match many generic user requests about video creation, which can cause this skill to be invoked when a more specific or safer skill would be more appropriate. In an agent environment, overbroad routing increases the chance of unintended tool usage, misclassification of user intent, and expanded access to media-generation actions beyond the narrow scope the user expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This instruction says that when a platform prefers English, the prompt should be translated into English. That is a natural-language policy concern because it mandates a language change without stating user opt-in or offering a choice.

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 contains user-facing instructional content exclusively in Chinese, and nowhere indicates that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without user opt-in is 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
91% confidence
Finding

This code file contains natural-language instructions, help text, and status/error messages exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

模块文档字符串明确说明该脚本用于按情绪规划拼接背景音乐并输出立体声 WAV,示例和参数也全部围绕音乐轨道生成展开。结合技能描述中“仅处理视频生成”的限制,这种内嵌文档表述与技能整体意图相背,体现出文档所宣称用途和技能预期用途之间的主动偏离。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

技能描述聚焦于将图片或文字转化为视频方案、平台适配提示词,并在可用工具存在时生成视频;虽然描述中提到“视频配乐、语气词配音、字幕叠加、多镜头拼接”等适用场景,但本文件是一个独立的背景音乐合成器,直接进行音频波形合成并输出 WAV,而非视频生成或视频编排逻辑。这属于代码实现了一个独立的音频生成能力,与“本技能仅处理视频生成”的边界不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and inline comments present the skill’s behavior exclusively in Chinese, which can impose a specific language on users without documented opt-in. This matches the language/locale policy concern for natural-language content embedded in code files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and default configuration specify only Chinese voice lines and Chinese neural voices, with no indication that language choice is optional. This is a natural-language policy concern because the skill imposes a specific locale/language by default rather than offering user selection or explicit opt-in.

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/add_subtitles.py (reported line 148)May include surrounding context.

python
out,
    ]
    print("ffmpeg:", " ".join(cmd[:8]), "...")
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print("FFMPEG_ERROR:\n", r.stderr[-2000:])
        sys.exit(1)

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/mux_audio.py (reported line 28)May include surrounding context.

python
out,
    ]
    print("ffmpeg:", " ".join(cmd[:8]), "...")
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print("FFMPEG_ERROR:\n", r.stderr[-2000:])
        sys.exit(1)

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/stitch_videos.py (reported line 153)May include surrounding context.

python
out,
    ]
    print("ffmpeg:", " ".join(cmd[:8]), "...")
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print("FFMPEG_ERROR:\n", r.stderr[-2000:])
        sys.exit(1)

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/probe_video.py (reported line 28)May include surrounding context.

python
def probe(ffmpeg: str, path: str) -> dict:
    """解析 ffmpeg -i 的 stderr 输出,返回结构化元信息。"""
    r = subprocess.run([ffmpeg, "-i", path], capture_output=True, text=True)
    info = r.stderr
    out = {"path": path}

Static analysis

No suspicious patterns detected.