subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
] try: result = subprocess.run(cmd, capture_output=True, text=True, timeout=600, encoding='utf-8') if result.returncode == 0: file_size = Path(output_path).stat().st_size / 1024 / 1024 print(f" ✅ 视频已生成:{output_path} ({file_size:.2f} MB)")- Confidence
- 79% confidence
- Finding
- While the subprocess itself avoids shell injection, the code constructs an ffmpeg `subtitles` filter string from a file path with only partial escaping. FFmpeg filter parsing has its own metacharacters and protocol behaviors, so a crafted subtitle path could break filter syntax or trigger unintended file/protocol access when this skill processes attacker-controlled paths.
