T08 · Insecure Dependencies
- Location
SKILL.md:68- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent video-editing helper, but it needs Review because weak path validation can let crafted production plans pull audio from outside the chosen SFX folder and the install/runtime steps are under-scoped.
Install only if you trust the production_plan.json source and are comfortable running FFmpeg and Python media tooling locally. Use a virtual environment with pinned dependencies, keep inputs and outputs in a dedicated workspace, avoid arbitrary SFX type values, and review generated subtitles and output paths before publishing or overwriting files.
SKILL.md:68Unpinned Third-Party Dependency Installation
scripts/render_video.py:27SFX Path Traversal Allows Access Outside the Authorized Asset Directory
scripts/generate_subtitles.py:73ASS Control Syntax Injection Through Unescaped Subtitle Plan Data
The declared description promises a full short-video post-production pipeline, including subtitle phrasing, keyword highlighting, SFX, BGM, and final polished video rendering. The supplied code chunk is a narrow preprocessing/transcription utility: it checks ffmpeg dependencies, extracts mono WAV audio, transcribes with faster-whisper using word timestamps, captures segment and word timing, and writes JSON. This is only one sub-step of the declared workflow (speech transcription/alignment). There is no code for subtitle styling/compositing, effects/music logic, video editing, or final render output. Therefore the description materially overstates the implemented behavior.
The declared description presents a full post-production pipeline for short-form video editing, starting from a raw talking-head video and ending with a finished video including subtitles, SFX, and BGM. The supplied code does not perform those end-to-end tasks. It only reads a JSON plan and generates an ASS subtitle script with styling, line wrapping, fade, and highlighted words. While subtitle generation and keyword highlighting are consistent with part of the description, the primary purpose is much narrower than declared, and several major claimed capabilities are absent.
The skill invokes shell commands, reads local resources, and writes output files, but it does not declare any tool scope or execution permissions. This creates an authorization and review gap: an agent may execute filesystem and shell operations more broadly than users or platform policy expect, increasing the chance of unintended command execution or file modification.
The workflow hard-codes --language "zh", which imposes a specific language/locale choice. The file does not state that the skill is only for Chinese-language videos or offer the user a language selection, so this is a natural-language policy concern.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "default=noprint_wrappers=1:nokey=1", video_path
]
output = subprocess.check_output(cmd, stderr=subprocess.PIPE).decode("utf-8").strip()
return float(output)
except Exception as e:
print_err(f"Warning: Could not get video duration via ffprobe: {e}")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"ffmpeg", "-i", video_path, "-vn", "-acodec", "pcm_s16le",
"-ar", "16000", "-ac", "1", "-y", audio_path
]
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
print_err(f"Error: ffmpeg extraction failed with exit code {result.returncode}")
print_err(result.stderr.decode())
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"""Check if ffmpeg and ffprobe are available."""
for cmd in ["ffmpeg", "ffprobe"]:
try:
subprocess.run([cmd, "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except FileNotFoundError:
print_err(f"Error: '{cmd}' is not installed or not in PATH.")
return False
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-show_entries", "format=duration:stream=codec_type,width,height",
"-of", "json", input_path
]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise Exception(f"ffprobe failed: {result.stderr}")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-show_entries", "stream_side_data=rotation",
"-of", "csv=p=0", args.input
]
rot_result = subprocess.run(rot_cmd, capture_output=True, text=True)
rot_str = rot_result.stdout.strip()
if rot_str:
rotation = int(float(rot_str))
The script unconditionally passes -y to ffmpeg, causing the output path to be overwritten without confirmation. In an agent context where output paths may be generated or influenced automatically, this can destroy existing user files or clobber important artifacts, especially if a sensitive or unexpected path is supplied.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print("Executing FFmpeg...")
try:
process = subprocess.Popen(
ffmpeg_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
The skill instructs creating a sibling output directory and writing multiple files near the user-supplied video path without warning about side effects, path safety, or overwrite behavior. In practice this can lead to unintended modification of sensitive locations, clutter in shared directories, or destructive overwrites if filenames collide or if the input path points to an unexpected mount or workspace.
This markdown file contains substantive instructions and operational guidance primarily in Chinese, but it does not indicate that the skill is Chinese-only or provide any user opt-in for language/locale. That can violate a language-choice policy when users may reasonably expect neutral or selectable language behavior.
The script sets --language to zh by default, which imposes a specific language/locale behavior unless the user explicitly overrides it. This is a natural-language policy concern because the tool defaults to one language rather than offering neutral auto-detection or requiring user choice.
No suspicious patterns detected.