Tainted flow: 'request' from os.getenv (line 54, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
def _request(self, method: str, url: str, body: bytes | None = None, headers: dict[str, str] | None = None) -> Any: request = urllib.request.Request(url, data=body, headers=headers or {"Accept": "application/json"}, method=method) try: with urllib.request.urlopen(request, timeout=self.timeout) as response: # noqa: S310 - URL is API base/user input by design. raw = response.read().decode("utf-8") except urllib.error.HTTPError as exc: detail = exc.read().decode("utf-8", errors="replace")- Confidence
- 95% confidence
- Finding
- with urllib.request.urlopen(request, timeout=self.timeout) as response: # noqa: S310 - URL is API base/user input by design.
