Back to skill

Security audit

Picture Book Video

Security checks for vulnerabilities and agentic risk

Overview

This video-generation skill is not clearly malicious, but it needs review because it has under-disclosed external TTS use, host-specific dependency loading, and file-handling behavior that can overwrite or delete project files.

Install only if you are comfortable running local media-processing scripts in a dedicated project directory and sending narration text to Edge TTS when used. Avoid pointing --output-dir at an existing asset folder, review generated Douyin text before any publishing step, and treat the hard-coded local dependency paths as something to fix or verify before use.

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

T08 · Insecure Dependencies

Warning
Location
scripts/tts.py:3
Finding

Insecure Dependency Loading from a Hard-Coded User Directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_video.py:321
Finding

Default Cleanup Can Delete Pre-Existing Scene Images

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/stage_xfade.py:60
Finding

Cross-Fade Temporary Video Directory Is Never Removed

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • 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 (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description presents a full multimedia production pipeline, while the provided code only handles one sub-step: generating scene images from prompts via an external script. Although storyboard image generation is mentioned in the description, this chunk alone does not substantiate the broader declared functionality and therefore materially underdelivers relative to the claimed primary purpose. There are no obvious unrelated or risky undeclared capabilities beyond invoking a local generator script, but the primary behavior of the code chunk is much narrower than the declared skill behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

该脚本的总体方向与声明相关,确实是在编排视频生成流程、生成字幕并输出抖音描述。但声明描述的是一个更完整、自动化的“绘本脚本到双语视频”系统,而此代码块实际只覆盖编排层:解析脚本、生成 TTS/SRT、转 ASS、调用外部 pipeline 合成、写出发布文案。关键差异在于:1)声明中的分镜图、静态画面、动画生成并未在此代码中实现;2)英文版本不是自动生成双语,缺少翻译能力,只有脚本已含英文旁白时才会产出;3)声明中明确的 Qwen3-TTS 优先与 Edge TTS 回退策略在此代码中没有体现。因这些差异涉及核心能力而非实现细节,应判定为描述与行为不完全一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个端到端自动化内容生产技能:从绘本故事脚本出发,自动完成画面生成、旁白生成、字幕和双语版本合成,并附带发布文案。实际代码仅是其中后半段的视频装配脚本,明确要求用户提供 scenes-dir、audio、ass 三类现成素材,然后调用各 stage 脚本完成封面、Ken Burns 动画、转场拼接和音频字幕合成。代码没有任何脚本解析、分镜生成、TTS 调用、双语版本循环处理、文案生成逻辑。因此其实际行为仅覆盖声明中的一小部分“串联/合成”能力,主用途比声明窄得多,构成明显描述-行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This code chunk’s actual behavior is a narrow utility: parse SRT subtitles, split long subtitle text across timed ASS dialogue lines, style subtitles, and write an ASS file. While ASS subtitle generation is one component mentioned in the declared description, the declared purpose presents a much broader automated video-production workflow as the skill’s functionality. In this chunk, there is no evidence of video generation, storyboard creation, animation, TTS, bilingual processing, final media synthesis, or social-post metadata generation. Therefore the supplied code does not accurately represent the declared end-to-end purpose; it implements only a small sub-step of that pipeline.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full automated story-to-video production system with narration, subtitles, final synthesis, bilingual outputs, and publishing metadata. The actual code chunk only implements a narrow image-generation step: producing a single cover PNG from text inputs and an optional character asset. While this could be a supporting component within a larger video pipeline, on its own it does not match the declared primary purpose and omits nearly all of the advertised capabilities. There is no evidence of TTS, subtitle generation, video assembly, bilingual processing, or Douyin metadata generation in this code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes a comprehensive automated system for turning story scripts into final bilingual videos with narration, subtitles, composition, and social publishing metadata. The actual code chunk only performs one limited media-processing step: converting supplied scene images into fixed-duration MP4 clips via ffmpeg. Moreover, even within that stage, the implementation does not apply Ken Burns motion; it explicitly falls back to static frames. This is materially narrower and different from the declared end-to-end behavior, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents a broad multimedia production skill whose primary purpose is converting a story script into fully composed bilingual MP4 videos with visuals, subtitles, narration, and publishing metadata. The actual code chunk only implements a narrow supporting component: text-to-speech via Edge TTS with optional SRT subtitle output. While TTS is one part of the declared pipeline, this code does not demonstrate the pipeline itself and materially differs from the claimed primary behavior. It also contradicts the specific TTS claim by showing direct Edge TTS usage without local Qwen3-TTS preference or fallback handling. Therefore, the code chunk does not accurately represent the declared description.

Content

No source excerpt is available for this finding.

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Although the subprocess call itself is not shell-injectable, the script forwards untrusted prompt data from scene_prompts.json directly into an external generation pipeline with no validation or policy checks. In this skill context, that can enable prompt-based abuse of downstream tooling, unexpected resource consumption, or generation of unsafe/disallowed content if the upstream JSON is attacker-controlled.

Content

Scanner excerpt · scripts/gen_scenes.py (reported line 43)May include surrounding context.

python
print(f"\n🎬 Generating scene {scene:02d}...")
        print(f"   Prompt: {prompt[:80]}...")

        result = subprocess.run(
            [
                sys.executable,
                GENERATE_SCRIPT,

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

The script writes the final artifact to a fully user-controlled output path without any restriction to a safe base directory. If this skill runs with elevated filesystem access, an attacker can overwrite arbitrary writable files, clobber application data, or place files in sensitive locations via crafted output paths or symlink targets.

Content

Scanner excerpt · scripts/stage_xfade.py (reported line 71)May include surrounding context.

python
# 最终输出
    os.makedirs(os.path.dirname(args.output) or '.', exist_ok=True)
    subprocess.run(['cp', current, args.output], capture_output=True)
    
    final_dur = get_duration(args.output)
    print(f"✅ Concat output: {args.output} ({final_dur:.1f}s)")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that the skill will automatically generate a bilingual Chinese-English video, which imposes a language/locale behavior by default. Under the policy, language constraints should either be optional, user-selectable, or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill defines and instructs use of shell commands, file reads, and file writes, but it does not declare any explicit tool scope or permissions boundaries. In a skill ecosystem, this weakens policy enforcement and can allow broader-than-expected filesystem or command execution access if the runtime defaults are permissive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that TTS falls back to Edge TTS but does not clearly warn users that story text may be sent to a network-backed service. Because the input is children's story content and may include private or unpublished material, silent transmission to an external provider creates a real confidentiality and consent risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to activate on ordinary user requests about story or video creation, which can cause the wrong high-privilege skill to engage without sufficiently specific intent. In a skill-routing environment, overbroad matching increases the risk of unintended file operations, shell execution, or external service use on content the user did not mean to process with this pipeline.

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 CLI descriptions are written entirely in Chinese, which imposes a specific language on users without offering an opt-in or alternative. Under the policy, language constraints should be optional or explicitly justified as region-specific.

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

python
print(f"\n🎬 Generating scene {scene:02d}...")
        print(f"   Prompt: {prompt[:80]}...")

        result = subprocess.run(
            [
                sys.executable,
                GENERATE_SCRIPT,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring says the output includes both Chinese and English mp4 files, but parse_script only extracts Chinese narration fields and the main flow merely checks for a non-existent 'narration_en' field. When English narration is absent, the code only prints a warning and skips generation, so the promised bilingual output is not reliably produced.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The comment at L211 states that English narration should come from script extraction or translation, yet parse_script never populates 'narration_en' and no translation logic exists in this file. The subsequent code only warns the user if no English narration is found, contradicting the documented intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code always generates narration using zh-CN-XiaoyiNeural for Chinese and en-US-JennyNeural for English, which imposes specific language/locale selections. The file does not provide a user opt-in or configurable locale parameter for these policy-relevant choices.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file presents its primary natural-language interface and instructions exclusively in Chinese, including the module description and user-facing help text. Under the policy, forcing a specific language without offering a choice or documenting a justified regional constraint is a natural-language 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_video.py (reported line 52)May include surrounding context.

python
print(f"\n{'='*50}")
    print(f"  🎬 Stage {stage_name}")
    print(f"{'='*50}")
    result = subprocess.run(cmd, capture_output=False, text=True)
    if check and result.returncode != 0:
        print(f"❌ Stage {stage_name} 失败", file=sys.stderr)
        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/pipeline.py (reported line 43)May include surrounding context.

python
print(f"\n{'='*50}")
    print(f"  🎬 Stage {stage_name}")
    print(f"{'='*50}")
    result = subprocess.run(cmd, capture_output=False, text=True)
    if check and result.returncode != 0:
        print(f"❌ Stage {stage_name} 失败", file=sys.stderr)
        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/pipeline.py (reported line 128)May include surrounding context.

python
cover_clip_path = os.path.join(work_dir, "cover_clip.mp4")
        
        # 先把封面做成视频片段
        subprocess.run([
            FFMPEG, '-y', '-loop', '1', '-i', cover_out,
            '-vf', f'scale={args.width}:{args.height}:force_original_aspect_ratio=decrease,'
                   f'pad={args.width}:{args.height}:(ow-iw)/2:(oh-ih)/2:color=0x1a1a3e',

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_video.py (reported line 36)May include surrounding context.

python
def get_duration(path):
    result = subprocess.run(
        [FFMPEG, '-i', path, '-f', 'null', '-'],
        capture_output=True, text=True
    )

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

python
def get_duration(path):
    result = subprocess.run(
        [FFMPEG, '-i', path, '-f', 'null', '-'],
        capture_output=True, text=True
    )

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

python
def get_duration(path):
    result = subprocess.run(
        [FFMPEG, '-i', path, '-f', 'null', '-'],
        capture_output=True, text=True
    )