Tainted flow: 'SOUL_FILE' from os.environ.get (line 16, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
# 添加到文件末尾 content += f"\n\n{marker_start}\n{prompt}\n{marker_end}\n" with open(SOUL_FILE, 'w') as f: f.write(content) return True- Confidence
- 90% confidence
- Finding
- The output path for SOUL.md is derived from environment variables and then opened for writing without validation or confinement to a trusted directory. If an attacker can influence OPENCLAW_DIR or OPENCLAW_WORKSPACE, the script can overwrite arbitrary files accessible to the process, which is especially risky because this job appears to run automatically.
