Back to skill

Security audit

OpenClaw Memory Orchestrator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for memory optimization, but it needs Review because it can persistently rewrite local memory data and export memory summaries and metadata to remote services with weak safeguards.

Install only if you are comfortable with the skill indexing and rewriting OpenClaw memory files. Keep remote sync and Mem0 sync disabled unless you have reviewed the data being exported and are using an approved HTTPS endpoint. Avoid following the curl-to-shell Ollama fallback, pin chromadb in a controlled environment, and back up memory-records.jsonl before running dedupe, canonicalize, optimize, or gc commands.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/hm4d_installer.py:143
Finding

Optional installation guidance executes mutable remote code through a shell pipeline

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/memory-token-pipeline.py:253
Finding

Weak sensitivity classification permits confidential memory summaries to be exported to arbitrary remote endpoints

Content
View full analysis
str: lowered = text.lower() secret_markers = ["api key", "token", "password", "private key", "bearer ", "ssh "] private_markers = ["192.168.", "10.", "172.16.", "internal", "vpn", "firewall"] if any(marker in lowered for marker in secret_markers): return "secret" if any(marker in lowered for marker in private_markers): return "private" return "internal" ``` Ingested records use that heuristic and otherwise receive a remote synchronization policy: ```python def build_record(path: Path) -> tuple[Record, List[str], str] | None: if not path.is_file() or path.suffix.lower() != ".md": return None if should_skip(path): return None text = clean_text(path.read_text(encoding="utf-8")) if not text: return None summarized = summarize_markdown(text) record_type = classify(path, text) content_hash = sha(text) title = summarized["titles"][0] if summarized["titles"] else path.stem record_id = f"mem_{path.stem}_{content_hash[:12]}" rel_path = str(path.relative_to(ROOT)) record_class = "compact" sync_policy = "remote-compact" vector_profile = "compacted" source_kind = "compressed-summary" importance = importance_for(record_type, path, text) salience_level, retention_tier = infer_salience_and_retention(record_type, rel_path, importance, text) record = Record( id=record_id, type=record_type, source_path=rel_path, title=title ...[truncated 5952 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned ChromaDB dependency creates a mutable software supply-chain risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (24)

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The script suggests the classic curl | sh pattern for installing Ollama, which executes a network-fetched script without integrity verification. Even though this file only emits the command as fallback guidance, embedding such an unsafe install pattern in an installer materially increases the chance that users or agents will execute arbitrary remote code.

Content

Scanner excerpt · scripts/hm4d_installer.py (reported line 149)May include surrounding context.

python
'python_dep': f'{sys.executable} -m pip install chromadb',
            'git': 'sudo apt install git',
            'python3': 'sudo apt install python3 python3-pip',
            'ollama_optional': 'curl -fsSL https://ollama.com/install.sh | sh',
            'run_installer': 'bash install.sh',
        }
    if env['is_windows']:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code opens the session memory JSONL file in write mode and rewrites its contents, permanently removing duplicate records identified earlier. Although the script prints a summary afterward, there is no pre-action warning, confirmation prompt, or explanatory comment/docstring disclosing that it performs a destructive in-place modification of stored data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code opens the backing JSONL store in write mode and rewrites it, permanently removing deduplicated records. Although the script prints a summary afterward, there is no warning, confirmation prompt, or pre-action disclosure before performing this destructive file modification.

Content

No source excerpt is available for this finding.

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 · scripts/hm4d_installer.py (reported line 49)May include surrounding context.

python
def run(cmd):
    return subprocess.run(cmd, capture_output=True, text=True, check=False)


def detect():

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/hm4d_installer.py (reported line 81)May include surrounding context.

python
missing = []
    for dep in PY_DEPS:
        try:
            __import__(dep)
        except Exception:
            missing.append(dep)
    if not missing:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script can invoke pip install automatically for missing dependencies, changing the Python environment without an explicit opt-in. In a skill/agent environment this increases risk because dependency installation executes package installation logic and may pull unreviewed code from package indexes.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/hm4d_installer.py (reported line 147)May include surrounding context.

python
if env['is_linux']:
        return {
            'python_dep': f'{sys.executable} -m pip install chromadb',
            'git': 'sudo apt install git',
            'python3': 'sudo apt install python3 python3-pip',
            'ollama_optional': 'curl -fsSL https://ollama.com/install.sh | sh',
            'run_installer': 'bash install.sh',

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/hm4d_installer.py (reported line 148)May include surrounding context.

python
if env['is_linux']:
        return {
            'python_dep': f'{sys.executable} -m pip install chromadb',
            'git': 'sudo apt install git',
            'python3': 'sudo apt install python3 python3-pip',
            'ollama_optional': 'curl -fsSL https://ollama.com/install.sh | sh',
            'run_installer': 'bash install.sh',

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installer creates directories under a workspace path and copies many scripts into that location automatically, without prompting the user or offering a dry-run mode. In an agent-skill context, silent filesystem modification is riskier because execution may occur with limited user visibility, causing persistence or overwriting trusted workspace content.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest declares that raw transcripts are not stored, but the ingest path writes summary text into memory/archive/raw-summaries/*.txt. This creates a security and privacy integrity gap: operators may rely on the manifest to make handling decisions while sensitive content is still being persisted to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The remote sync path uploads summaries and metadata to a remote ChromaDB collection without any interactive confirmation, consent gate, or explicit warning at execution time. Because this pipeline processes memory records that may include internal project context and derived sensitive information, accidental or misunderstood use can cause unintended data exfiltration to external infrastructure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The Mem0 sync path sends structured memory content and metadata to an external CLI without an execution-path warning or affirmative user acknowledgement. Even though eligibility filtering excludes secret/private labels, this still exports internal memory content to another system and can violate user expectations or data handling requirements.

Content

No source excerpt is available for this finding.

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 · scripts/memory-token-pipeline.py (reported line 1435)May include surrounding context.

python
}, ensure_ascii=False),
        ]
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, check=False)
            if result.returncode == 0:
                synced.append(record.get("id"))
            else:

Tainted flow: 'cmd' from os.environ.get (line 1424, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/memory-token-pipeline.py (reported line 1435)May include surrounding context.

python
}, ensure_ascii=False),
        ]
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, check=False)
            if result.returncode == 0:
                synced.append(record.get("id"))
            else:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The top-level CLI description labels the tool as a '低 Token 記憶管線' and its core commands focus on ingesting, summarizing, indexing, and searching memory. But sync-mem0 invokes an external openclaw mem0 store subprocess for each eligible record at L1422-L1435, which introduces external command execution and propagation into another memory system. Without any manifest purpose available to justify that broader integration, this is a capability expansion beyond the apparent scope of a local memory-token pipeline.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script dynamically loads and executes Python modules from workspace-controlled paths using importlib without validating provenance, integrity, or trust boundaries. If an attacker can modify files in the workspace or influence OPENCLAW_WORKSPACE, running this benchmark will execute arbitrary code with the user's privileges, making this more dangerous than a simple missing disclosure issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs users to run bash install.sh directly, which can make arbitrary system changes without any warning, review step, or description of what the script will do. In a package-install context this is a real supply-chain and host-integrity risk, especially since the file also points users to an external GitHub repository for a fuller version.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is unpinned, so installations may resolve to different versions over time, including newly introduced vulnerable or breaking releases. This weakens reproducibility and makes it harder to verify what code will actually be installed in downstream environments.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
chromadb

Unverifiable Dependency: chromadb has 8 known advisory(ies) (CVE-2026-45830 (ChromaDB allows any authenticated users to arbitrarily read, write, update, or d); CVE-2026-45833 (ChromaDB has a code injection vulnerability); CVE-2026-45829 (ChromaDB Python project has a pre-authentication code injection vulnerability) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest references chromadb without a version, while the package family has multiple known advisories including code injection and access-control issues. Because no version is specified, there is no way to determine whether deployment will install a fixed release or a vulnerable one, creating avoidable supply-chain and runtime risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI description and help text are presented only in Chinese, which imposes a specific language on users. Under the language/locale policy, this should be configurable or clearly offered as an opt-in unless the tool is explicitly documented as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code creates a reports directory and writes a markdown report to disk, which is a file-write operation covered by the missing-warning rule for code files. There is no confirmation prompt, comment/docstring warning, or prior user-facing disclosure before the write occurs; the only print happens afterward.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains natural-language strings in Chinese for query behavior, but provides no indication that multilingual or locale-specific behavior is optional or user-selected. Under the policy rule for language or locale constraints, embedding a specific language choice without opt-in can violate organizational language-choice expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script uses a hard-coded default query string in Traditional Chinese (不存在的查詢測試) when no arguments are provided. This imposes a specific language choice without offering the user any opt-in or locale selection, which is a natural-language policy issue under the locale/language rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script writes a markdown report to the workspace memory/reports directory, which modifies user/project files. While the final JSON output includes the report path after the fact, there is no upfront disclosure in comments, docstrings, or a user-facing message warning that running the script will create or overwrite a report file.

Content

No source excerpt is available for this finding.