Memory Workflow
Memory workflow skill has undeclared network exfiltration behavior: user memory content is sent to an external Ollama LLM service (scripts/store.py:extract_triples_via_llm) without disclosure in SKILL.md, combined with hardcoded Docker bridge IPs as service endpoints.
为什么得出这个结论
3/4 个维度触发发现 2 项声明之外的能力或越权行为。
提取到 1 个高危 IOC 或外联信号。
报告包含 4 步攻击链,另有 3 项高危或严重发现。
依赖结构存在,但暂未看到明显高危告警。
攻击链
初始入口 · scripts/store.py:110
权限提升 · scripts/store.py:130
最终危害 · scripts/store.py:94
最终危害 · scripts/store.py:170
风险分是怎么被拉高的
extract_triples_via_llm() sends user memory content to OLLAMA_URL (default host.docker.internal:11434) — not declared in SKILL.md
config.py hardcodes 172.17.0.1 for rerank (18778) and embedding (18779) services — suspicious default targets
get_embedding() POSTs content to external embedding endpoint — not mentioned in SKILL.md tool descriptions
最关键的证据
Undeclared LLM data transmission
extract_triples_via_llm() in store.py sends user memory content to an external Ollama LLM endpoint (OLLAMA_URL, defaulting to host.docker.internal:11434) for entity/relation extraction. This external network call is not declared anywhere in SKILL.md, which only mentions 'Ollama (可选)' as a KG dependency without explaining that user content is transmitted.
scripts/store.py:94 SKILL.md hides external service dependencies
SKILL.md claims '三层存储架构' with file + FTS5 + KG + Milvus, but omits that KG extraction and embedding both require external HTTP calls. The embedding call to bge-m3 at 172.17.0.1:18779 sends all stored content over the network.
SKILL.md:1 Hardcoded Docker bridge IP addresses as default service endpoints
config.py hardcodes 172.17.0.1 (the default Docker bridge gateway) as the default endpoint for rerank (18778) and embedding (18779) services. This is a suspicious default target as it enables exfiltration to the Docker host if those ports are open, without requiring explicit user configuration.
scripts/config.py:12 Embedding API call sends all content to external service
get_embedding() in store.py POSTs all user memory content to EMBEDDING_URL (defaulting to http://172.17.0.1:18779/v1/embeddings) for vectorization before Milvus storage. This network call is not declared in the tool descriptions.
scripts/store.py:170 Undeclared shell execution via subprocess
BaseMemoryTool._run_op() uses subprocess.run() to execute memory_ops.py with arbitrary command arguments. This shell execution pattern is not declared in SKILL.md — only the tool names and descriptions are listed. Additionally, save_session.py independently uses subprocess without being exposed as a declared tool.
scripts/tools.py:48 SKILL.md installation modifies AGENTS.md with shell commands
SKILL.md instructs users to add bash command blocks to ~/.openclaw/workspace/AGENTS.md that pipe heredocs into python3 scripts. This is an unusual installation pattern that injects shell execution instructions into agent configuration.
SKILL.md:12 声明能力 vs 实际能力
scripts/store.py: writes to ~/.openclaw/workspace/memory-workflow-data/ scripts/store.py:94 — sends content to OLLAMA_URL via urllib; scripts/store.py:170 — POSTs to EMBEDDING_URL scripts/tools.py:48 — subprocess.run executes memory_ops.py; scripts/save_session.py:35 — subprocess.run scripts/config.py:14-17, store.py:32-34 — reads OLLAMA_URL, MILVUS_HOST, etc. SKILL.md declares 6 tool interfaces 可疑产物与外联
172.17.0.1 scripts/config.py:12
http://172.17.0.1:18778 scripts/config.py:12
http://172.17.0.1:18779/v1/embeddings scripts/store.py:33
http://host.docker.internal:11434 scripts/store.py:37
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| pymilvus | unpinned | pip | 否 | Used for Milvus vector storage, imported conditionally |
| jieba | unpinned | pip | 否 | Chinese segmentation, imported conditionally |
| urllib.request | stdlib | Python | 否 | Used for HTTP calls to Ollama and embedding API |
文件构成
scripts/store.py scripts/tools.py SKILL.md scripts/config.py