Tainted flow: 'req' from os.environ.get (line 25, credential/environment) → urllib.request.build_opener.open (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 if not token: raise ValueError('请配置 HUANGLI_API_TOKEN,密钥可在 https://www.xungufa.com/apikey/ 创建。') req = Request(url, headers={'Authorization': 'Bearer ' + token, 'Accept': 'application/json'}) with build_opener(NoRedirect()).open(req, timeout=30) as response: return json.load(response)
