Back to skill

Security audit

Viral Reels Creator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent video-editing helper, but it includes unsafe command-building examples, an overwrite-prone export script, and broad system-level install instructions that users should review before installing.

Install only in an isolated environment such as a container or virtual machine. Review generated ffmpeg commands before running them, avoid untrusted or unusual filenames, use safe output names without slashes or traversal, and prefer a virtual environment with pinned dependencies instead of system-wide pip installs.

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

T09 · Insecure Skill Coding Practices

Error
Location
transitions.md:255
Finding

Shell Command Injection in Multi-Clip Transition Generators

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/beat-sync.md:129
Finding

Shell Command Injection in Beat-Sync Assembly Generator

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch-export.sh:23
Finding

Output-Name Path Traversal and Forced File Overwrite

Content
View full analysis
/dev/null 2>&1 || { echo "ERROR: ffmpeg not found. Install with: apt-get install ffmpeg" exit 1 } mkdir -p "$OUTPUT_DIR" ``` Representative forced-overwrite sink: ```bash if should_export "instagram"; then OUT="${OUTPUT_DIR}/${OUTPUT_NAME}_instagram.mp4" log_start "Instagram Reels (1080x1920, max 90s, CRF 18)" TRIM="" [ "$DURATION_INT" -gt 90 ] && TRIM="-t 90" ffmpeg -i "$INPUT" \ $SCALE_9x16 \ $BASE_VIDEO -preset slow -crf 18 -r 30 \ $BASE_AUDIO -b:a 128k \ $TRIM -y "$OUT" 2>/dev/null fi ``` ### Technical Analysis `OUTPUT_NAME` is incorporated twice into filesystem paths without validation: ```text /mnt/user-data/outputs//_instagram.mp4 ``` The script does not reject absolute path elements, directory separators, `..` traversal components, or symbolic-link redirection. `mkdir -p` creates the resulting directory, while the repeated `ffmpeg -y` operations force replacement of existing output files. Although fixed platform suffixes constrain the exact final filename, a malicious output name can still escape the intended ...[truncated 1155 chars]
Remediation
View remediation
&2 exit 1 fi ``` - Explicitly reject `/`, `\`, `..`, control characters, and leading hyphens. - Resolve the canonical output directory and verify that it remains beneath `/mnt/user-data/outputs`. - Refuse symbolic-link output directories or open outputs using no-follow protections where available. - Avoid unconditional `-y`; use `-n` by default or require an explicit trusted overwrite option. - Create the output directory with restrictive permissions. - Validate `PLATFORMS` against a strict comma-separated allowlist. - Quote `basename` arguments consistently, for example `basename "$INPUT"` and `basename "$OUT"`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scene-detect.py:167
Finding

Unsafe Shell Commands Emitted from User-Controlled Video Paths

Content
View full analysis
list[str]: """Generate ffmpeg trim commands for each top moment.""" commands = [] for i, m in enumerate(moments): t = max(0, m["timestamp"] - 1.0) # start 1s before peak cmd = ( f"ffmpeg -ss {t:.3f} -i \"{video_path}\" " f"-t {clip_duration} " f"-c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -r 30 " f"-c:a aac -ar 44100 -ac 2 " f"moment_{i+1:02d}.mp4" ) commands.append(cmd) return commands ``` The generated commands are subsequently displayed: ```python trim_commands = generate_trim_commands( args.video, top_moments, args.clip_duration ) # ... print("FFMPEG TRIM COMMANDS (copy the ones you want):") for cmd in trim_commands: print(f"\n{cmd}") ``` ### Technical Analysis The script does not execute these trim commands itself, so this is a second-stage injection rather than an immediate subprocess vulnerability. However, `video_path` originates from the command line and is embedded within double quotes without escaping double quotes, command substitutions, backticks, backslashes, or other shell-sensitive characters. The program explicitly labels the resulting text as commands to copy. If a user or agent executes the generated output, shell syntax present in the original filename can be interpreted. The script’s actual analysis subprocesses use argument arrays and are not vulnerable to this particular shell interpolation issue. ### Attack Path 1. An attacker supplies a video whose filename contains shell-sensitive syntax. 2. The script accepts the existing file path ...[truncated 687 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding

Unpinned System-Wide Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger text is extremely broad and matches many ordinary media-editing requests, causing this shell-capable skill to activate in situations where safer or narrower skills might be more appropriate. Because the skill also directs execution of local scripts and package installers, over-triggering materially increases the chance of unintended command execution on untrusted user-supplied media.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The Python example constructs a shell command by interpolating file paths and filter content into a single string and executes it with shell=True. If any input-derived value such as source filenames, music_file, or output_file contains shell metacharacters, an attacker could inject additional commands, leading to arbitrary command execution.

Content

Scanner excerpt · references/beat-sync.md (reported line 166)May include surrounding context.

f"-c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -r 30 " f"-c:a aac -ar 44100 -ac 2 -movflags +faststart {output_file}" ) subprocess.run(cmd, shell=True)

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Using subprocess.run(cmd, shell=True) on a command string containing interpolated variables is a classic command-injection sink. An attacker who can influence clip names or other command fragments could execute arbitrary commands on the host, potentially leading to data loss, credential exposure, or full environment compromise.

Content

Scanner excerpt · references/transitions.md (reported line 247)May include surrounding context.

fc = "\n".join(fc_parts).rstrip(";") cmd = f'ffmpeg {inputs} -filter_complex "{fc}" -map "[vout]" -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -r 30 -movflags +faststart output.mp4' subprocess.run(cmd, shell=True)

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

subprocess.run(cmd, shell=True) is a direct command-execution sink. Because the command string is assembled from variables including input filenames, an attacker who can influence those values may achieve arbitrary command execution on the host running the skill or copied script.

Content

Scanner excerpt · transitions.md (reported line 281)May include surrounding context.

fc = "\n".join(fc_parts).rstrip(";") cmd = f'ffmpeg {inputs} -filter_complex "{fc}" -map "[vout]" -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -r 30 -movflags +faststart output.mp4' subprocess.run(cmd, shell=True)

text

---

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to run shell commands such as apt-get, pip, python, bash, ffmpeg, and ffprobe, but it declares no explicit tool scope or permission boundary. That means a broadly triggered skill could cause powerful command execution without a clear least-privilege contract, increasing the risk of unintended package installation, script execution, or processing of attacker-controlled files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document provides a strobe/flash animation snippet that rapidly drives frames to full white without any accompanying safety warning about photosensitive seizure risk or viewer discomfort. In a social-video creation skill, this omission is more dangerous because the content is explicitly intended for broad public distribution on platforms where creators may use the effect without understanding health risks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The Python example constructs a shell command by interpolating filenames directly into a single command string and then executes it through the shell. If any clip filename is user-controlled, shell metacharacters can break out of the intended ffmpeg invocation and execute arbitrary OS commands, which is especially dangerous in a media-editing skill that commonly processes uploaded files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example executes a shell command derived from filenames without warning that untrusted filenames are unsafe, increasing the likelihood that downstream developers will copy the pattern into production. Because this skill is designed for end-user video composition, filenames and paths are plausibly influenced by uploads or project metadata, making command injection a realistic risk.

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/beat-detect.py (reported line 42)May include surrounding context.

python
def extract_audio(input_path: str, tmp_audio: str) -> str:
    """Extract audio from video file to wav for analysis."""
    subprocess.run(
        ["ffmpeg", "-i", input_path, "-ac", "1", "-ar", "22050",
         "-y", tmp_audio],
        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/beat-detect.py (reported line 110)May include surrounding context.

python
Less accurate than librosa but requires no Python packages.
    """
    # Get audio stats over time (100ms chunks)
    result = subprocess.run(
        ["ffmpeg", "-i", audio_path,
         "-af", "astats=metadata=1:reset=1",
         "-f", "null", "-"],

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/scene-detect.py (reported line 39)May include surrounding context.

python
def get_video_duration(video_path: str) -> float:
    """Get video duration in seconds using ffprobe."""
    result = subprocess.run(
        ["ffprobe", "-v", "quiet", "-print_format", "json",
         "-show_entries", "format=duration", video_path],
        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/scene-detect.py (reported line 50)May include surrounding context.

python
def detect_scene_changes(video_path: str, threshold: float) -> list[float]:
    """Use ffmpeg scdet filter to find scene change timestamps."""
    result = subprocess.run(
        ["ffmpeg", "-i", video_path,
         "-vf", f"scdet=threshold={threshold}",
         "-an", "-f", "null", "-"],

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/scene-detect.py (reported line 76)May include surrounding context.

python
frame_path = os.path.join(tmpdir, f"frame_{timestamp:.3f}.jpg")

    # Extract frame
    subprocess.run(
        ["ffmpeg", "-ss", str(timestamp), "-i", video_path,
         "-vframes", "1", "-q:v", "2", "-y", frame_path],
        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/scene-detect.py (reported line 157)May include surrounding context.

python
for i, m in enumerate(moments):
        t = m["timestamp"]
        out_path = os.path.join(output_dir, f"moment_{i+1:02d}_t{t:.1f}s.jpg")
        subprocess.run(
            ["ffmpeg", "-ss", str(t), "-i", video_path,
             "-vframes", "1", "-q:v", "2", "-y",
             "-vf", "scale=540:960", out_path],

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Python example both executes a shell command and omits any warning that it should not be used with untrusted filenames or user-controlled values. In this skill context, users are likely to upload arbitrary media files, so documentation that normalizes unsafe shell execution patterns increases the chance of accidental command injection in downstream use.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The embedded Python example constructs a shell command string from clip filenames and other variables, then executes it with subprocess.run(..., shell=True). If any clip name or transition-related value is influenced by untrusted input, shell metacharacters can break out of the ffmpeg command and execute arbitrary OS commands, which is especially risky in an agent skill that may process user-supplied media paths or filenames.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file includes an apt-get install -y command that changes the host system by installing packages, but the surrounding text does not warn the user that it will modify system state or may require elevated privileges. Under the markdown-file criteria for missing user warnings, system-affecting behavior should be disclosed when it can impact system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file includes executable example code that produces a file at /mnt/user-data/outputs/beat_reel.mp4 and runs ffmpeg to create that output, but the surrounding text does not warn that it will write to disk or potentially overwrite an existing file depending on ffmpeg behavior and flags. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user data or system state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file includes an apt-get install -y command that modifies the host system by installing packages, but the surrounding text does not warn that it changes system state or may require elevated privileges. For markdown files, safety-affecting behavior should be disclosed when it can impact system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file provides direct ffmpeg command examples that read and write local media files, but it does not include any warning that users should verify input/output paths or expect files to be created or overwritten depending on their ffmpeg flags. Because SQP-2 applies to markdown files when potentially impactful behavior is undocumented, a brief disclosure would improve safety.

Content

No source excerpt is available for this finding.