Tainted flow: 'CONFIG_FILE' from os.environ.get (line 20, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
"saved_at_human": time.ctime() } with open(CONFIG_FILE, 'w') as f: json.dump(config, f, indent=2) self.consumer_key = consumer_key- Confidence
- 94% confidence
- Finding
- The file write sink is real: the path is derived from FATSECRET_CONFIG_DIR, so an attacker who can influence the agent's environment can redirect credential storage to an arbitrary filesystem location writable by the process. Because this write contains API secrets, the issue can cause secret exposure, overwriting of sensitive files in the agent context, or persistence in unintended locations.
