subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
f.write(f"file '{os.path.abspath(p)}'\n") output_path = os.path.join(output_dir, "output_video.mp4") subprocess.run([ "ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", concat_path, "-vf", f"scale={original_width}:{original_height}"- Confidence
- 86% confidence
- Finding
- This ffmpeg concat/render path processes generated file lists and user-influenced dimensions without robust validation. While it does not use a shell, media pipelines are a frequent attack surface for malformed inputs, path tricks, and resource exhaustion, and this function expands the skill from draft generation into arbitrary local media rendering.
