Tainted flow: 'CONFIG_FILE' from os.environ.get (line 12, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
def write_config(data): CONFIG_DIR.mkdir(parents=True, exist_ok=True) with open(CONFIG_FILE, "w", encoding="utf-8") as f: json.dump(data, f, indent=2, ensure_ascii=False)- Confidence
- 83% confidence
- Finding
- CONFIG_FILE is derived from the CHANJING_CONFIG_DIR environment variable and then written without validation. If an attacker can influence the environment in which the skill runs, they can redirect credential writes to an arbitrary filesystem location, potentially overwriting user files or storing secrets in an unsafe path.
