Tainted flow: 'req' from os.environ.get (line 47, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
) try: with urlopen(req, timeout=150) as response: return json.loads(response.read().decode("utf-8")) except HTTPError as e: body = e.read().decode("utf-8") if e.fp else ""- Confidence
- 94% confidence
- Finding
- The request target is derived from environment-controlled configuration via API_BASE_URL, then used directly in urlopen with the Authorization API key attached. If an attacker can influence LINKFOX_TOOL_GATEWAY/STORE_API_BASE_URL/SPAPI_BASE_URL, they can redirect the request to an attacker-controlled host and capture the API key and request data. In an agent/skill context, environment values are often deployment-controlled, so this creates a realistic secret exfiltration and SSRF-style risk.
