Tainted flow: 'req' from os.environ.get (line 241, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 96% confidence
- Finding
Sending AK/SK to Huawei IAM for authentication is not inherently exfiltration, but this request uses a shared SSL context that disables certificate and hostname verification when SKILL_QUALITY_INSECURE=1. Under that configuration, an active network attacker could intercept the raw cloud credentials and returned token; the default verified-TLS configuration is not vulnerable to that specific attack.
- Content
python headers={"Content-Type": "application/json"}, ) ctx = _ssl_context() with urllib.request.urlopen(req, timeout=HTTP_TIMEOUT + 5, context=ctx) as resp: if resp.status != 201: logger.warning("IAM Token 获取失败: HTTP %d", resp.status) return None
