Tainted flow: 'CONFIG_FILE' from os.environ.get (line 26, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
} STORAGE_PATH.mkdir(parents=True, exist_ok=True) with open(CONFIG_FILE, 'w') as f: json.dump(config, f, indent=2) os.chmod(CONFIG_FILE, 0o600)- Confidence
- 92% confidence
- Finding
- The config file path is derived from the BODY_MANAGEMENT_DATA environment variable and is used for writing sensitive credentials without validation. An attacker who can influence the process environment could redirect the API key write to an unintended location, causing secret exposure, overwrite of arbitrary user-writable files, or placement in a less protected directory.
