T09 · Insecure Skill Coding Practices
- Location
search.py:111- Finding
Plaintext Duplication of Sensitive OpenClaw Memory Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This looks like a real local memory search skill, but it under-discloses how much private memory data it reads, stores, and sends to a local embedding service.
Review this before installing if your OpenClaw memory or knowledge files may contain secrets, credentials, private notes, or sensitive work data. Running --build creates a persistent plaintext index under ~/.openclaw and processes memory content through a local Ollama component despite the documentation claiming TF-IDF and no external dependencies.
search.py:111Plaintext Duplication of Sensitive OpenClaw Memory Content
search.py:70Undisclosed Ollama Dependency and Sensitive Data Processing
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def get_embedding(text):
"""通过 ollama CLI 获取 embedding"""
result = subprocess.run(
['ollama', 'embed', EMBEDDING_MODEL, text],
capture_output=True, text=True
)
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
import urllib.request
import json as json_lib
data = json_lib.dumps({"model": EMBEDDING_MODEL, "input": text}).encode()
req = urllib.request.Request(
"http://localhost:11434/api/embed",
data=data,
headers={"Content-Type": "application/json"}
During index building, the script sends memory file contents to the Ollama embedding backend without an explicit consent prompt or clear disclosure at the point of transmission. In a memory-search skill, those files may contain sensitive notes, secrets, or personal data, so silent transmission to a local service can violate user expectations and widen exposure if the service is remote-bound, logged, or shared.
Docstrings, usage text, and runtime messages are presented in Chinese only, and the skill provides no language selection or opt-in mechanism. This can violate language/locale policy where tools must not force a specific language without user choice or clear justification.
The search query is sent to the embedding service without explicit notice. While lower risk than bulk memory indexing, queries can still contain sensitive information, so undisclosed transmission creates a privacy issue.
No suspicious patterns detected.