Tainted flow: 'req' from os.environ.get (line 17, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
def download(url, out_path): try: req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'}) with urllib.request.urlopen(req, timeout=20) as r, open(out_path, 'wb') as f: f.write(r.read()) return os.path.exists(out_path) and os.path.getsize(out_path) > 0 except Exception as e:- Confidence
- 92% confidence
- Finding
- with urllib.request.urlopen(req, timeout=20) as r, open(out_path, 'wb') as f:
