Tainted flow: 'req' from os.environ.get (line 59, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=30) as resp: body = resp.read().decode("utf-8", errors="replace") except urllib.error.HTTPError as exc: body = exc.read().decode("utf-8", errors="replace")- Confidence
- 92% confidence
- Finding
- The billing endpoint base URL is taken from the MINERDETECTOR_BILLING_API_URL environment variable and then used to send authenticated HTTP requests with the X-API-Key header. If an attacker can influence the environment, they can redirect requests to an attacker-controlled server and exfiltrate the API key or manipulate billing responses; in a paid-export skill, this is especially dangerous because it combines credential disclosure with financial actions.
