Tainted flow: 'request' from os.environ.get (line 74, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 94% confidence
- Finding
The client lets MRO_API_BASE_URL come directly from an environment variable and then sends the bearer API key in an Authorization header to that URL. If an attacker can influence the environment or wrapper configuration, they can redirect requests to an attacker-controlled host and exfiltrate the credential, making this effectively an SSRF-plus-secret-leak issue. In an agent/skill context, user-controlled execution environments and indirect configuration make this more dangerous because the tool is designed to automatically call remote services with sensitive authentication material.
- Content
python }, ) try: with urlopen(request, timeout=timeout, context=tls_context()) as response: return decode_response(response.read()) except HTTPError as exc: detail = decode_response(exc.read())
