Tainted flow: '_CACHE_FILE' from os.environ.get (line 66, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
def _save_cache(data: dict): _CACHE_DIR.mkdir(parents=True, exist_ok=True) with open(_CACHE_FILE, "w", encoding="utf-8") as f: json.dump(data, f, ensure_ascii=False, separators=(",", ":")) def _load_cache() -> Optional[dict]:- Confidence
- 90% confidence
- Finding
- The cache file path is derived from the untrusted SKILL_CACHE_DIR environment variable and is later used for file writes. In environments where attackers can influence process environment variables, this can redirect writes to arbitrary filesystem locations, potentially overwriting application files, planting data in sensitive paths, or causing denial of service.
