T07 · Tool Hijacking and Spoofing
- Location
hooks/openclaw/pre_request.py:11- Finding
Working-directory-relative hook path allows execution of a spoofed activator script
- Content
View full analysis
/scripts/activator.py` will satisfy the check and be executed by the trusted Python interpreter. The code does not resolve the path using `__file__`, validate that the resulting path remains under the installed Skill root, or verify the script's identity. The environment whitelist limits exposure to unrelated environment variables, but the spoofed script still receives all `TRUNKATE_*` and `OPENCLAW_*` variables. These can include `TRUNKATE_API_KEY`, `OPENCLAW_HISTORY_PATH`, token metadata, and error information. The spoofed Python process also retains the filesystem and network privileges of the hook process. ### Attack Path 1. An attacke ...[truncated 1440 chars]- Remediation
View remediation
