Tainted flow: 'url' from os.environ.get (line 139, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
""" url = f"{API_BASE_URL}{API_PATH}?{urllib.parse.urlencode({**params, 'appkey': appkey})}" try: with urllib.request.urlopen(url, timeout=15) as response: return json.loads(response.read().decode("utf-8")) except urllib.error.HTTPError as exc: return {"code": exc.code, "message": f"接口请求失败: HTTP {exc.code}", "data": ""}- Confidence
- 94% confidence
- Finding
- The request target is derived from JIKE_API_BASE_URL, an environment variable, and then used in urllib.request.urlopen(). If an attacker can influence the runtime environment, they can redirect requests to an arbitrary host, causing SSRF-like behavior, leaking the appkey in the query string, or sending traffic to internal services. In this skill context the danger is moderated because the code only performs a GET to a fixed path, but it still trusts externally supplied network destination configuration without validation.
