Tainted flow: 'download_url' from requests.get (line 120, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
print(f"📥 正在下载视频至 {output_path}...") with open(output_path, "wb") as f: video_response = requests.get(download_url) video_response.raise_for_status() f.write(video_response.content) print(f"✅ 视频已保存: {output_path} ({os.path.getsize(output_path) / 1024:.0f} KB)")- Confidence
- 91% confidence
- Finding
- The code blindly performs a second GET to a download_url supplied by the API response, without validating the scheme, host, or whether redirects are safe. If the upstream service, account, or response path were compromised, this could trigger server-side request forgery or unintended access to internal or sensitive network locations from the machine running the script.
