subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 回退到 ffmpeg try: cmd = ["ffmpeg", "-i", url, "-c", "copy", output_path, "-y"] subprocess.run(cmd, check=True, capture_output=True) print(f"✅ 视频已保存: {output_path}") return output_path except subprocess.CalledProcessError as e:- Confidence
- 82% confidence
- Finding
- Although shell injection is avoided, ffmpeg is invoked on a user-controlled URL, and ffmpeg supports multiple protocols and remote inputs. In a skill context where arbitrary users may supply URLs, this can enable SSRF-style network access to internal services or retrieval of local/unsupported resources depending on ffmpeg build configuration and runtime environment.
