Back to skill

Security audit

短剧剪辑

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because it reports a path-redirection weakness that could overwrite files outside the intended output folder, and the scan was incomplete.

Consider the reported file-write redirection risk and the incomplete scan before installing. Review the skill’s permissions and use it only where unintended file changes would be limited; the available scan does not fully establish safety.

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

Warning
Location
scripts/edit_tool.py
Finding

Attacker-supplied project paths can redirect rendering writes outside the authorized output directory

Content
View full analysis

Impact

Unauthorized creation or replacement of writable files outside the rendering directory. CUT traversal produces MP4 output and requires existing intermediate directories; subtitle symlink redirection can truncate a target regardless of its extension. This establishes an integrity impact, not demonstrated arbitrary code execution.

Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (19)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
命令行工具由 [edit_tool.py](scripts/edit_tool.py) 提供:

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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 · assets/remotion/README.md (reported line 23)May include surrounding context.

  • macOS / Linux:
    bash
    mkdir -p ~/.cache/short-drama-edit/remotion && cd ~/.cache/short-drama-edit/remotion && npm install
    
  • Windows PowerShell:
    powershell

MCP server referenced without pinned version: 'npx remotion'.

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

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

python
def _has_ffmpeg_filter(ffmpeg: str, name: str) -> bool:
    result = subprocess.run(
        [ffmpeg, "-hide_banner", "-filters"],
        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/edit_tool.py (reported line 1253)May include surrounding context.

python
def probe_duration(media: Path) -> float:
    probe = _require("ffprobe")
    result = subprocess.run(
        [probe, "-v", "error", "-show_entries", "format=duration",
         "-of", "default=nw=1:nk=1", str(media)],
        capture_output=True, text=True, check=False,

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

python
def probe_stream(media: Path) -> dict[str, Any]:
    probe = _require("ffprobe")
    result = subprocess.run(
        [probe, "-v", "error", "-select_streams", "v:0", "-show_entries",
         "stream=width,height,r_frame_rate", "-show_entries", "format=duration",
         "-of", "json", str(media)],

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

python
"""(sample rate, channel layout) of the first audio stream; None when it has none."""

    probe = _require("ffprobe")
    result = subprocess.run(
        [probe, "-v", "error", "-select_streams", "a:0", "-show_entries",
         "stream=sample_rate,channels,channel_layout", "-of", "json", str(media)],
        capture_output=True, text=True, check=False,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The command decodes the entire audio stream and buffers all PCM output in memory, then copies it into an array. An untrusted project can supply very long or highly compressed audio that exhausts memory or runs indefinitely; this path is also used during checking, not just rendering.

Content

Scanner excerpt · scripts/edit_tool.py (reported line 1549)May include surrounding context.

python
def _pcm_samples(ffmpeg: str, media: Path, rate: int, channels: int) -> Sequence[int]:
    """The media's sound as interleaved signed 16-bit samples. Raises when it cannot be read."""

    result = subprocess.run(
        [ffmpeg, "-v", "error", "-i", str(media), "-ac", str(channels), "-ar", str(rate),
         "-f", "s16le", "-"],
        capture_output=True, check=False,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
88% confidence
Finding

Raw RGB frames are fully buffered before statistics are computed, with no decoded-output budget. Sampling reduces ordinary workload but does not bound attacker-controlled duration or aspect ratio, so crafted project media can still exhaust memory.

Content

Scanner excerpt · scripts/edit_tool.py (reported line 3041)May include surrounding context.

python
def _sampled_stats(command: list[str]) -> Optional[ChannelStats]:
    result = subprocess.run(
        command + ["-pix_fmt", "rgb24", "-f", "rawvideo", "-"], capture_output=True, check=False
    )
    if result.returncode != 0 or len(result.stdout) < 3:

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

python
"""

    common = f"I={target}:TP={true_peak:g}:LRA=11"
    result = subprocess.run(
        [ffmpeg, "-hide_banner", "-nostats", "-i", str(media),
         "-af", f"loudnorm={common}:print_format=json", "-f", "null", "-"],
        capture_output=True, text=True, check=False,

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

python
probe = _which("ffprobe")
    if probe is None or not media.is_file():
        return None
    result = subprocess.run(
        [
            probe, "-v", "error", "-select_streams", "v:0",
            "-show_entries", "stream=codec_name", "-of", "default=nw=1:nk=1", str(media),

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

python
else:
        cmd = [*argv, "--props", str(props), "--output", str(overlay)]
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, check=False)
    except OSError as error:
        raise EditError(f"无法启动外部叠层渲染命令 {cmd[0]!r}: {error}") from error
    if overlay.is_symlink():

MCP server referenced without pinned version: 'npx is'.

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

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

python
encoding="utf-8",
    )
    overlay = output_root / "叠层.webm"
    result = subprocess.run(
        [npx, "remotion", "render", REMOTION_COMPOSITION, str(overlay),
         f"--props={props}", "--log=error",
         f"--concurrency={max(1, concurrency)}"],

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

Verification captures every sampled RGB frame from a segment before calculating its mean color. Neither segment duration nor the aspect-ratio-derived output height is bounded, allowing a malicious project to cause excessive memory consumption despite the low sampling rate.

Content

Scanner excerpt · scripts/edit_tool.py (reported line 4096)May include surrounding context.

python
def _segment_colour(ffmpeg: str, path: Path) -> Optional[tuple[float, float]]:
    """Mean luma and blue-red difference of one segment, on a 0-255 scale."""

    result = subprocess.run(
        [ffmpeg, "-v", "error", "-i", str(path), "-vf", "fps=2,scale=96:-1",
         "-pix_fmt", "rgb24", "-f", "rawvideo", "-"],
        capture_output=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/edit_tool.py (reported line 4154)May include surrounding context.

python
else "未测(剪辑单没有声明目标时长)"
        ),
    }
    result = subprocess.run(
        [ffmpeg, "-hide_banner", "-nostats", "-i", str(final),
         "-af", "loudnorm=print_format=json", "-f", "null", "-"],
        capture_output=True, text=True, check=False,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

Every decoded grayscale frame is buffered in subprocess output and then copied into a list of frame objects. Memory consumption grows with film duration and frame rate without a limit, so verification of attacker-controlled project output can exhaust the host's memory.

Content

Scanner excerpt · scripts/edit_tool.py (reported line 4248)May include surrounding context.

python
"""Every frame of the film, grey, at FRAME_PROBE_SIZE."""

    width, height = FRAME_PROBE_SIZE
    result = subprocess.run(
        [ffmpeg, "-v", "error", "-i", str(media), "-vf", f"scale={width}:{height},format=gray",
         "-f", "rawvideo", "-"],
        capture_output=True, check=False,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

Although this helper does not use a shell, render callers construct FFmpeg output paths from cut IDs that permit slashes and traversal components, then write with overwrite enabled. Output directories and fixed output filenames also lack comprehensive symlink protection, allowing an attacker-controlled project to redirect generated files outside the intended output directory and overwrite files writable by the agent.

Content

Scanner excerpt · scripts/edit_tool.py (reported line 4531)May include surrounding context.

python
def _run(command: Sequence[str]) -> None:
    result = subprocess.run(command, capture_output=True, text=True, check=False)
    if result.returncode != 0:
        raise EditError(f"命令失败: {' '.join(command[:6])}…\n{result.stderr.strip()}")