Tainted flow: 'req' from os.environ.get (line 90, 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 body = json.dumps({k: v for k, v in payload.items() if v is not None}).encode("utf-8") req = urllib.request.Request(url, data=body, headers={"Content-Type": "application/json"}) try: with urllib.request.urlopen(req, timeout=self.timeout) as resp: raw = resp.read() except urllib.error.HTTPError as e: # Telegram answers errors with a JSON body; read it, drop the exception (its text has the URL)
