Tainted flow: 'req' from os.getenv (line 44, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
try: req = urllib.request.Request(url, data=json.dumps(data).encode(), headers=headers) with urllib.request.urlopen(req, context=ctx) as response: result = json.loads(response.read().decode()) return result['choices'][0]['message']['content'] except Exception as e:- Confidence
- 99% confidence
- Finding
- The code explicitly disables TLS certificate validation by setting check_hostname to False and verify_mode to CERT_NONE, then sends both the bearer API key and user prompt over HTTPS. This enables man-in-the-middle interception or modification of requests and responses, which can expose credentials, leak prompts, and allow response tampering despite using an HTTPS URL.
