Tainted flow: 'cred_path' from os.environ.get (line 62, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
def save_config(user_id, config): cred_path = os.path.join(CREDENTIALS_DIR, f"{user_id}.json") with open(cred_path, "w") as f: json.dump(config, f, indent=2) os.chmod(cred_path, 0o600) print(f"✅ Config saved to {cred_path}")- Confidence
- 95% confidence
- Finding
- with open(cred_path, "w") as f:
