Tainted flow: 'req' from os.environ.get (line 33, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
req.add_header("Authorization", f"Bearer {api_token}") try: response = urllib.request.urlopen(req) response_data = json.loads(response.read().decode("utf-8")) if response_data.get("code") == 0 and "data" in response_data:- Confidence
- 97% confidence
- Finding
- The request target is derived from PASSNOTE_API_URL, an environment variable, and the same request carries the bearer token in the Authorization header. If an attacker can influence that environment variable, the script will send the token and memo contents to an attacker-controlled endpoint, creating a straightforward credential and data exfiltration path. The default also uses plain HTTP, which further increases exposure if used off localhost.
