Tainted flow: 'req' from os.environ.get (line 517, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 97% confidence
- Finding
The optional LLM judge sends evaluation evidence to an externally configurable API endpoint using credentials read from environment variables. This creates a real data exfiltration channel because
OPENAI_API_BASEcan redirect requests to an arbitrary host and the payload includes internal evaluation evidence, while the bearer token is also transmitted to that destination.- Content
python headers={'Content-Type': 'application/json', 'Authorization': f'Bearer {api_key}'}, ) try: with urllib.request.urlopen(req, timeout=15) as resp: body = json.loads(resp.read()) text = body['choices'][0]['message']['content'].strip() if text.startswith('```'):
