Scan Report
67 /100
mind-wander
Autonomous background reasoning agent that explores open questions using a local LLM, FalkorDB knowledge graph, and Perplexity web search
SKILL.md documents a read-only reasoning agent but the actual implementation contains undeclared arbitrary Python code execution (sandbox_run), filesystem writes (elevate, DEAD_ENDS.md), external network requests, and system cron registration — a significant doc-to-code mismatch.
Do not install this skill
Do not use until SKILL.md is updated to accurately declare all tool capabilities (sandbox_run, elevate, search_web, FalkorDB access, cron registration). sandbox_run() is particularly dangerous as it bypasses the stated no-network sandbox claim through Python exec with weak string-based blocking.
Attack Chain 6 steps
◎
Entry User installs skill expecting a read-only background reasoning agent from SKILL.md
SKILL.md:1⬡
Escalation install.sh runs automatically, installing pip packages, registering a 30-min cron job, and reading ~/.openclaw/openclaw.json for tokens
scripts/install.sh:70⬡
Escalation sandbox_run() executes arbitrary Python code via subprocess.run(['python3', '-c', ...]) — bypasses weak BLOCKED-list string checks
scripts/tools.py:310⬡
Escalation read_file() and elevate() write arbitrary content to workspace files (MENTAL_EXPLORATION.md, DEAD_ENDS.md, state.json)
scripts/tools.py:358◉
Impact search_web() exfiltrates workspace content via Perplexity API calls using the user's API key
scripts/tools.py:130◉
Impact Cron persistence reinstalls on each run via gateway API — survives skill 'uninstall' if gateway token remains
scripts/install.sh:151Findings 9 items
| Severity | Finding | Location |
|---|---|---|
| High | Undeclared arbitrary Python code execution via sandbox_run() RCE | scripts/tools.py:310 |
| High | SKILL.md tool table omits 4 of 8 tools Doc Mismatch | SKILL.md:1 |
| High | Undeclared cron job registration on install Persistence | scripts/install.sh:151 |
| High | Undeclared credential file access Sensitive Access | scripts/tools.py:137 |
| Medium | Weak sandbox BLOCKED-list trivially bypassed Obfuscation | scripts/tools.py:302 |
| Medium | Unpinned pip dependencies in install.sh Supply Chain | scripts/install.sh:77 |
| Medium | Third-party model download from HuggingFace Supply Chain | scripts/install.sh:99 |
| Low | Hardcoded internal IP addresses expose infrastructure Priv Escalation | SKILL.md:111 |
| Low | Skill description overstates local-only nature Doc Mismatch | SKILL.md:10 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Filesystem | READ | WRITE | ✗ Violation | scripts/tools.py:elevate() writes MENTAL_EXPLORATION.md; scripts/wander_graph.py… |
| Shell | NONE | WRITE | ✗ Violation | scripts/tools.py:sandbox_run() → subprocess.run(['python3', '-c', safe_code]) ex… |
| Network | NONE | READ+WRITE | ✗ Violation | scripts/tools.py:search_web() POSTs to api.perplexity.ai; scripts/wander_graph.p… |
| Database | NONE | READ+WRITE | ✗ Violation | scripts/tools.py:query_graph() reads/writes FalkorDB 'workspace' graph; scripts/… |
| Environment | NONE | READ | ✗ Violation | scripts/tools.py:search_web() reads ~/.openclaw/openclaw.json for API key; scrip… |
| Skill Invoke | NONE | WRITE | ✗ Violation | scripts/install.sh registers cron jobs via gateway API; SKILL.md does not mentio… |
1 High 7 findings
High IP Address 硬编码 IP 地址
172.18.0.1 SKILL.md:111 Medium External URL 外部 URL
http://172.18.0.1:11436 SKILL.md:111 Medium External URL 外部 URL
https://doi.org/10.1038/nrn.2016.113 references/research.md:21 Medium External URL 外部 URL
https://doi.org/10.1038/nrn1607 references/research.md:27 Medium External URL 外部 URL
https://arxiv.org/abs/2409.02685 references/research.md:33 Medium External URL 外部 URL
https://bootstrap.pypa.io/get-pip.py scripts/install.sh:75 Medium External URL 外部 URL
https://api.perplexity.ai/chat/completions scripts/tools.py:130 File Tree
11 files · 81.2 KB · 2167 lines Python 7f · 1654L
Markdown 3f · 301L
Shell 1f · 212L
├─
▾
references
│ ├─
research.md
Markdown
│ └─
setup.md
Markdown
├─
▾
scripts
│ ├─
agent.py
Python
│ ├─
collector.py
Python
│ ├─
install.sh
Shell
│ ├─
mind_wander_config.py
Python
│ ├─
prompt.py
Python
│ ├─
run.py
Python
│ ├─
tools.py
Python
│ └─
wander_graph.py
Python
└─
SKILL.md
Markdown
Dependencies 5 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
huggingface_hub | * | pip | No | Version not pinned in install.sh |
httpx | * | pip | No | Version not pinned in install.sh |
falkordb | * | pip | No | Version not pinned in install.sh |
numpy | * | pip | No | Version not pinned in install.sh |
Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-v2-GGUF | unknown | HuggingFace third-party | No | Third-party model repo, not official Qwen — integrity not verifiable |
Security Positives
✓ sandbox_run() has a timeout (30s) and line limit (50 lines) — some resource controls exist
✓ sandbox_run() blocks some dangerous imports (subprocess, socket, urllib, requests, httpx, eval, exec, __import__) — at least a basic denylist is present
✓ read_file() has a workspace boundary check to prevent path traversal
✓ The novelty gate (strict criteria for elevate()) means most outputs are benign — findings written to a markdown file
✓ Dead ends are tracked to avoid redundant exploration — reduces unnecessary file writes
✓ SKILL.md exists and provides a reasonable description of the high-level concept
✓ Code is well-structured with docstrings explaining each function's purpose
✓ Uses standard, well-known libraries (httpx, falkordb) rather than obscure custom crypto