Tainted flow: 'CONFIG_PATH' from os.environ.get (line 10, credential/environment) → pathlib.Path.write_text (file write)
Medium
- Category
- Data Flow
- Content
def save_config(cfg: dict[str, Any]) -> None: CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) CONFIG_PATH.write_text(json.dumps(cfg, ensure_ascii=False, indent=2), encoding="utf-8")- Confidence
- 92% confidence
- Finding
- The config file path is derived from the IDEA_INBOX_CONFIG environment variable and then used directly for directory creation and file writing without validation. If an attacker can influence the environment in which the skill runs, they can redirect writes to unintended locations, causing arbitrary file overwrite within the process's filesystem permissions and potentially clobbering sensitive user files.
