Back to skill

Security audit

Auto Video Cut

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate local video-cutting skill, but it needs Review because batch mode can recursively delete a user-chosen working directory without safeguards.

Review carefully before installing. Run it only on copies of videos, use a dedicated empty working directory, avoid passing any important folder as the third argument, and install dependencies in a virtual environment. Treat generated transcripts and reports as sensitive if the videos contain private speech.

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)

T09 · Insecure Skill Coding Practices

Error
Location
video_editor_auto_v4.6.py:566
Finding

Arbitrary User-Supplied Working Directory Is Recursively Deleted

Content
View full analysis
= 2 and os.path.isdir(sys.argv[1]): input_dir = sys.argv[1] output_dir = sys.argv[2] if len(sys.argv) > 2 else "./output" work_dir = sys.argv[3] if len(sys.argv) > 3 else "./video_work" os.makedirs(output_dir, exist_ok=True) os.makedirs(work_dir, exist_ok=True) process_batch(input_dir, output_dir, work_dir) return ``` ### Technical Analysis Batch mode permits the caller to supply any path as `work_dir`. The program calls `os.makedirs(..., exist_ok=True)`, which accepts an already existing directory, and does not record whether the directory was created by the current execution. After successful concatenation, `shutil.rmtree(work_dir, ignore_errors=True)` recursively deletes the entire selected directory. There is no canonical-path validation, dedicated ownership marker, restriction to a program-controlled temporary root, check against filesystem roots or important user directories, or confirmation before deletion. Consequently, the cleanup operation is not limited to temporary artifacts created by this program. The use of `ignore_errors=True` also suppresses deletion errors, making partial destructive cleanup less visible. This behavior is not disclosed in `SKILL.md`. ### Attack Path 1. An attacker, unsafe wrapper, or mistaken operator invokes batch mode with a writable existing directory as the third argument, for example: ```bash python3 video ...[truncated 1103 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Executable Third-Party Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
``` 2. Generate a lock file containing exact transitive dependency versions and cryptographic hashes. For pip-based deployment, use hash enforcement: ```bash pip install --require-hashes -r requirements.lock ``` 3. Regenerate the lock file only through a controlled dependency-update process that includes source review, vulnerability scanning, and functional testing. 4. Install dependencies in an isolated virtual environment under a non-privileged account. Do not recommend system-wide or root-level pip installation. 5. Configure an approved package index or internal artifact mirror and verify package provenance where supported. 6. Pin and document compatible FFmpeg and Python versions as part of a reproducible deployment specification. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises automatic video analysis and references openai-whisper, but it does not warn users that spoken audio will be transcribed and analyzed. This can lead to unintended processing of sensitive personal, confidential, or regulated content, especially when users may not realize transcripts are being generated as part of the workflow.

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 · SKILL.md (reported line 33)May include surrounding context.

md
pip install openai-whisper

# Ubuntu / Debian
sudo apt install ffmpeg
pip install openai-whisper

# Windows

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 · video_editor_auto_v4.6.py (reported line 88)May include surrounding context.

python
"-af", f"silencedetect=noise={CONFIG['silence_noise']}dB:d={CONFIG['silence_duration']}",
        "-f", "null", "-"
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    starts = re.findall(r'silence_start: ([\d.]+)', result.stderr)
    ends = re.findall(r'silence_end: ([\d.]+)', result.stderr)
    return [(float(starts[i]), float(ends[i])) for i in range(min(len(starts), len(ends)))]

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 · video_editor_auto_v4.6.py (reported line 391)May include surrounding context.

python
"-af", f"silencedetect=noise={CONFIG['silence_noise']}dB:d={CONFIG['silence_duration']}",
        "-f", "null", "-"
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    starts = re.findall(r'silence_start: ([\d.]+)', result.stderr)
    ends = re.findall(r'silence_end: ([\d.]+)', result.stderr)
    return [(float(starts[i]), float(ends[i])) for i in range(min(len(starts), len(ends)))]

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 · video_editor_auto_v4.6.py (reported line 178)May include surrounding context.

python
def transcribe_segment(video_path, seg, work_dir):
    """Extract segment audio and transcribe via Whisper"""
    audio_path = os.path.join(work_dir, f"segment_{seg.index}.wav")
    subprocess.run([
        "ffmpeg", "-y", "-i", video_path,
        "-ss", str(seg.start_time), "-to", str(seg.end_time),
        "-vn", "-ar", "16000", "-ac", "1", audio_path

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 · video_editor_auto_v4.6.py (reported line 188)May include surrounding context.

python
print(f"    ⚠️  Audio extraction failed: segment_{seg.index}")
        return ""
    try:
        subprocess.run([
            "python3", "-m", "whisper", audio_path,
            "--model", "small", "--language", "zh",
            "--output_format", "txt", "--output_dir", work_dir

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The Whisper invocation hard-codes --language zh, which forces a specific language/locale. The surrounding code and top-level description do not present this as an opt-in choice or clearly justify the tool as a China-specific or Chinese-only workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comments and regex patterns explicitly target Chinese filler words, connectives, and sentence endings, meaning the skill's behavior is language-specific by design. Because this locale restriction is embedded in the implementation and not presented as a user choice or clearly documented regional constraint, it violates the language/locale policy requirement.

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 · video_editor_auto_v4.6.py (reported line 355)May include surrounding context.

python
"-c:a", "aac", "-b:a", CONFIG['audio_bitrate'],
        output_path
    ]
    return subprocess.run(cmd, capture_output=True, text=True).returncode == 0

def concat_videos(clip_paths, output_path):
    """Concatenate video list using FFmpeg concat protocol"""

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
83% confidence
Finding

The concat flow writes an FFmpeg concat list using raw filenames inside single quotes without escaping embedded quotes or special concat-file syntax. A crafted clip path containing a quote or newline can corrupt the list file and potentially inject additional concat directives, causing unintended file reads or concatenation of attacker-chosen local files.

Content

Scanner excerpt · video_editor_auto_v4.6.py (reported line 369)May include surrounding context.

python
"-c:a", "aac", "-b:a", CONFIG['audio_bitrate'],
        output_path
    ]
    ok = subprocess.run(cmd, capture_output=True, text=True).returncode == 0
    if os.path.exists(list_file):
        os.remove(list_file)
    return ok

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 · video_editor_auto_v4.6.py (reported line 430)May include surrounding context.

python
print("\n🎤 Step 6: Transcribing candidates...")
    whisper_available = True
    try:
        if subprocess.run(["python3", "-m", "whisper", "--help"], capture_output=True, text=True, timeout=10).returncode != 0:
            whisper_available = False
    except Exception:
        whisper_available = False

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Batch mode deletes generated clips and recursively removes the work directory automatically. If output_dir or work_dir are user-supplied or misconfigured, this can destroy data unexpectedly; in an automated agent context, destructive behavior without confirmation or path safety checks is materially riskier.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The only natural-language content in the file is in Chinese, with no indication that language selection is optional or that the skill is intended solely for a Chinese-speaking or region-specific context. Under the policy, language-specific behavior should either offer user choice or be clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file content is entirely in Chinese and directs collaborative work in that language, with no indication that other languages are supported or that the Chinese-only constraint is intentional and justified. This can violate language/locale policy when a skill implicitly requires a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents generated outputs (*.mp4 and *_报告.md) but does not warn users about file creation or possible overwriting in the target output path. For a skill that writes derived media files and reports, a brief disclosure helps users understand the impact on their filesystem before running it.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified without a version pin, so installs may pull different upstream releases over time. This creates supply-chain risk and reproducibility issues, including accidental adoption of a vulnerable or breaking version of openai-whisper.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
openai-whisper

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The top-level docstring identifies the program as "Video Auto Editor v4.7", but the filename and several runtime/report strings present it as a different version context, creating conflicting documentation about what exact build this code is. This is an intent/documentation inconsistency rather than a behavioral security issue, but it is an active contradiction in the file's own labeling.

Content

No source excerpt is available for this finding.