Tainted flow: 'key' from os.environ.get (line 146, credential/environment) → requests.post (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
- Content
python key = os.environ.get("OPENAI_API_KEY") or _read_key_file("~/.openai_key") if not key: raise RuntimeError("no OPENAI_API_KEY") r = requests.post( "https://api.openai.com/v1/audio/speech", headers={"Authorization": f"Bearer {key}"}, json={"model": "gpt-4o-mini-tts", "voice": voice, "input": text},
