Tainted flow: 'req' from os.environ.get (line 151, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
# 下载音频 try: req = urllib.request.Request(voice_url, headers={'sign': API_KEY}) with urllib.request.urlopen(req, timeout=60) as response: with open(output, 'wb') as f: f.write(response.read()) print(f"✅ 合成完成!已保存到: {os.path.abspath(output)}")- Confidence
- 90% confidence
- Finding
- The code downloads from a URL returned by the remote API and includes the API key in the request headers to that URL. If the service or an upstream response is compromised and returns an attacker-controlled URL, the client will send the secret to that host, causing credential leakage and arbitrary outbound requests.
