Tainted flow: 'policy_req' from os.environ.get (line 374, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
policy_req.add_header("Origin", "https://www.designkit.cn") policy_req.add_header("Referer", "https://www.designkit.cn/editor/") try: with urllib.request.urlopen(policy_req, timeout=30) as resp: code = resp.getcode() or 200 raw_policy = resp.read().decode() _request_log_response_json("policy_response_body", raw_policy, code)- Confidence
- 91% confidence
- Finding
- The request target for `urlopen(policy_req, ...)` is derived from remote data returned by the earlier `getsign` call, and the overall API base is itself environment-configurable via `DESIGNKIT_WEBAPI_BASE`. That means a compromised/misconfigured endpoint or attacker-controlled environment can cause the script to fetch arbitrary URLs, creating an SSRF-style primitive that can reach internal services or unexpected hosts from the agent runtime.
