Intent-Code Divergence
Low
- Confidence
- 87% confidence
- Finding
- The comment says the default state-file path is trusted, but it is derived from OPENCLAW_WORKSPACE, which is an environment variable and therefore attacker-controllable in many execution contexts. Because the explicit path validation is skipped for this default path, a hostile environment can redirect reads and writes of the state file and MEMORY.md outside the intended workspace, potentially overwriting sensitive user files under the account.
