Tainted flow: 'req' from os.environ.get (line 139, 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 fetch_xml(url): try: req = Request(url, headers={"User-Agent": "DHMZ-Weather-CLI/1.0"}) with urlopen(req, timeout=15) as r: return ET.parse(r).getroot() except (URLError, ET.ParseError) as e: print(f"ERROR: Failed to fetch {url}: {e}", file=sys.stderr)
