Back to skill

Security audit

直播自动识别高光时刻切片

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local video highlight tool that reads user-selected media and writes clip outputs locally, with ordinary hardening issues but no evidence of hidden access or malicious behavior.

Use this in a controlled local environment with media files you are comfortable processing. Prefer a fresh output directory, avoid unusual or untrusted filenames when possible, and pin or lock dependencies if reproducible installs matter.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Unvalidated Output Injection

High
Category
Output Handling
Content
"default=noprint_wrappers=1:nokey=1",
        str(video_path),
    ]
    result = subprocess.run(command, capture_output=True, text=True)
    if result.returncode != 0:
        fail(f"ffprobe 获取时长失败: {result.stderr.strip() or result.stdout.strip()}", EXIT_AUDIO_EXTRACT)
Confidence
78% confidence
Finding
On failure, the code prints ffprobe stderr/stdout directly into logs. Because media metadata and parser errors can incorporate attacker-controlled file names or crafted content, this can enable terminal/log injection such as forged log lines or ANSI escape sequence abuse in downstream consoles and log viewers.

Unvalidated Output Injection

High
Category
Output Handling
Content
"pcm_s16le",
        str(wav_path),
    ]
    result = subprocess.run(command, capture_output=True, text=True)
    if result.returncode != 0:
        fail(f"音频提取失败: {result.stderr.strip() or result.stdout.strip()}", EXIT_AUDIO_EXTRACT)
    log("OK", f"音频提取完成: {wav_path}")
Confidence
78% confidence
Finding
Raw ffmpeg stderr/stdout is reflected to the user on extraction failure. Since ffmpeg may echo attacker-controlled file names and parse diagnostics from untrusted media, this can be abused for log/terminal injection and operational confusion.

Unvalidated Output Injection

High
Category
Output Handling
Content
def run_ffmpeg(command: List[str], error_prefix: str) -> None:
    result = subprocess.run(command, capture_output=True, text=True)
    if result.returncode != 0:
        fail(f"{error_prefix}: {result.stderr.strip() or result.stdout.strip()}", EXIT_AUDIO_EXTRACT)
Confidence
80% confidence
Finding
The generic ffmpeg wrapper forwards raw stderr/stdout into fail(), which prints it directly. Any ffmpeg command processing attacker-supplied media can therefore surface untrusted content into logs or terminals, enabling log forgery or control-sequence injection across multiple call paths.

Unpinned Dependencies

Low
Category
Supply Chain
Content
librosa>=0.10.0
numpy>=1.24.0
pydub>=0.25.1
Confidence
89% confidence
Finding
The dependency is specified with a lower bound only, so future incompatible or compromised releases can be installed without review. This creates supply-chain risk and can also break reproducibility, especially for media-processing libraries with frequent dependency changes.

Unpinned Dependencies

Low
Category
Supply Chain
Content
librosa>=0.10.0
numpy>=1.24.0
pydub>=0.25.1
Confidence
89% confidence
Finding
Using numpy with only a minimum version allows any newer release to be resolved at install time, which weakens reproducibility and increases exposure to upstream supply-chain issues or unexpected breaking changes. In an automated environment, this can cause the skill to consume an unreviewed package version.

Unpinned Dependencies

Low
Category
Supply Chain
Content
librosa>=0.10.0
numpy>=1.24.0
pydub>=0.25.1
Confidence
88% confidence
Finding
An unpinned pydub dependency means the installed package version may vary over time and across environments. That increases the chance of pulling in a vulnerable or malicious upstream release and makes security review and incident response harder.

Static analysis

No suspicious patterns detected.