Tainted flow: 'BEHAVIOR_FILE' from os.environ.get (line 16, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
"""保存行为数据""" data["last_updated"] = datetime.now().isoformat() BEHAVIOR_FILE.parent.mkdir(parents=True, exist_ok=True) with open(BEHAVIOR_FILE, 'w') as f: json.dump(data, f, indent=2, ensure_ascii=False) def extract_from_memory(date_str=None):- Confidence
- 91% confidence
- Finding
- The output path for behavior-patterns.json is derived from environment-controlled base directories (OPENCLAW_DIR/OPENCLAW_WORKSPACE) and is written without validation or confinement checks. An attacker who can influence the environment can redirect writes to unintended files or locations, which is especially concerning because this skill persistently stores conversation-derived profiling data.
