Back to skill

Security audit

Local Memory Search

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
search.py:111
Finding

Plaintext Duplication of Sensitive OpenClaw Memory Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
search.py:70
Finding

Undisclosed Ollama Dependency and Sensitive Data Processing

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · search.py (reported line 78)May include surrounding context.

python
def get_embedding(text):
    """通过 ollama CLI 获取 embedding"""
    result = subprocess.run(
        ['ollama', 'embed', EMBEDDING_MODEL, text],
        capture_output=True, text=True
    )

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · search.py (reported line 87)May include surrounding context.

python
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"}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.