Tainted flow: 'req' from os.environ.get (line 274, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
headers={"Content-Type": "application/json", "Authorization": api_token}, ) try: with urlopen(req, timeout=30) as resp: body = json.loads(resp.read().decode()) break except urllib.error.HTTPError as e:- Confidence
- 93% confidence
- Finding
- The code reads `LINKFOX_AGENT_API_KEY` from the environment and sends it as an Authorization header to a base URL that can be overridden by `LINKFOX_TOOL_GATEWAY`. If an attacker can influence that environment variable, they can redirect the request to an attacker-controlled server and exfiltrate the API token.
