Tainted flow: 'req' from os.environ.get (line 41, credential/environment) → urllib.request.urlopen (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 def _get(url: str, key: str | None, timeout: float = 5.0): req = urllib.request.Request(url, headers={"Authorization": f"Bearer {key}"} if key else {}) with urllib.request.urlopen(req, timeout=timeout) as r: return json.load(r)
