Back to skill

Security audit

OpenClaw Boost Tools

Security checks for vulnerabilities and agentic risk

Overview

This local OpenClaw utility kit is not clearly malicious, but its permission and memory features have weak safeguards that can affect stored data or future agent context.

Install only if you are comfortable with a local Chinese-language toolkit that stores OpenClaw-related activity under ~/.openclaw/bw-openclaw-boost. Do not rely on its permission checker as a real security boundary, review or disable memory injection before using it in agent startup context, and back up memory/log data before running dream_consolidation with force-style arguments.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
tools/permission_manager.py:153
Finding

Permission Checker Authorization Bypass Through Substring-Based Command Allowlisting

Content
View full analysis
RuleEffect: """ 检查命令安全性 返回: "allow" | "ask" | "deny" """ # 检查危险模式 for pattern in tool_perm.dangerous_patterns: if re.search(pattern, command, re.IGNORECASE): return "deny" # 检查安全命令白名单 for safe in tool_perm.safe_commands: if safe == "*": return "allow" if safe in command: return "allow" # 默认需要询问 return "ask" ``` ```bash RESULT=$(python3 "$TOOLS_DIR/permission_manager.py" check "$TOOL" "$COMMAND" 2>/dev/null) case "$RESULT" in *"ALLOW"*) exit 0 ;; ``` ### Technical Analysis The permission checker treats a command as safe when any allowlisted string occurs anywhere within the complete command text: ```python if safe in command: return "allow" ``` This is not an effective command authorization boundary. It does not parse the executable, arguments, shell control operators, pipelines, redirections, substitutions, or additional commands. An unsafe compound command can therefore include an allowlisted substring such as `echo`, `ls`, or `cat` and receive an `allow` result. The allowlist also incl ...[truncated 2225 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
tools/dream_consolidation.py:205
Finding

Disabled Destructive Memory-Consolidation Feature Is Not Enforced at Runtime

Content
View full analysis
2 else 7 force = "--force" in sys.argv # 默认是安全模式(dry-run),需要 --force 才能实际删除 dry_run = not force if force: print("⚠️ 警告: 即将删除已整理的日志文件!") print() print(f"正在整理近 {days} 天的日志{' (安全模式,仅预览)' if ...[truncated 2577 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
tools/memory_relevance.py:235
Finding

Persistent Prompt Injection Through Untrusted Memory Content

Content
View full analysis
Path: """写入新记忆""" if mtype not in MEMORY_TYPES: raise ValueError(f"type 必须是: {MEMORY_TYPES}") # 确定目录 if mtype == 'log': today = datetime.now().strftime('%Y/%m') dir_path = MEMORY_ROOT / 'logs' / today else: dir_path = MEMORY_ROOT / mtype dir_path.mkdir(parents=True, exist_ok=True) # 文件名 safe_name = re.sub(r'[^\w\-]', '_', name)[:50] file_path = dir_path / f"{safe_name}.md" # 如果已存在,追加 timestamp = datetime.now().strftime('%Y-%m-%dT%H:%M:%S%z') if file_path.exists(): content = file_path.read_text(encoding='utf-8') content += f"\n\n---\n\n## 更新 {timestamp}\n\n{body}" else: content = f"""--- name: {name} description: {description or name} type: {mtype} mtime: {timestamp} --- {body} """ file_path.write_text(content, encoding='utf-8') return file_path ``` Retrieval returns at least three memories even when they do not have a positive relevance score: ```python def get_relevant_memories(query: str, max_results: int = MAX_RELEVANT) -> List[MemoryHeader]: """主入口:获取最相关的记忆""" memories = scan_memory_files() if not memories: return [] scored = score_memories(query, memories) # 返回 top N,且分数 > 0 result = [] for m, score in scored: if score > 0 or len(result) < 3: # 至少返回3个 result.append(m) if len(result) >= max_results: break return result ``` The selected file contents are inserted verbatim into context: ```python def format_for_context(query: str) - ...[truncated 3775 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (43)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · tools/dream_consolidation.py (reported line 143)May include surrounding context.

python
"""
        for rule in CONSOLIDATION_RULES:
            if re.search(rule.pattern, content, re.IGNORECASE):
                return rule
        return None
    
    def consolidate_log(self, log: Dict[str, Any]) -> bool:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · tools/permission_manager.py (reported line 267)May include surrounding context.

python
"""
        for rule in CONSOLIDATION_RULES:
            if re.search(rule.pattern, content, re.IGNORECASE):
                return rule
        return None
    
    def consolidate_log(self, log: Dict[str, Any]) -> bool:

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · tools/token_budget.py (reported line 243)May include surrounding context.

python
print("监控 Token 使用情况(Ctrl+C 退出)...")
            try:
                while True:
                    os.system('clear')
                    print(monitor.get_report())
                    time.sleep(10)
            except KeyboardInterrupt:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's comments and printed status/instructions are written in Chinese, including installation progress and usage guidance. This creates a language-policy concern because the skill does not offer any language selection or indicate that the locale restriction is intentional and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comments and all user-facing help strings are presented only in Chinese, including the usage and command descriptions. This creates a natural-language locale policy issue because the skill enforces a single language experience without opt-in, fallback, or justification that it is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and all user-facing text are written in Chinese, and the script's CLI messages later continue that requirement, effectively imposing a specific language on users. The file does not offer any language selection, fallback, or documented region-specific justification, which matches the locale-policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module claims system prompts are preserved, but auto_compact replaces older history with a synthetic system message and does not explicitly retain the original system prompt. In agent systems, losing or overwriting the real system prompt can weaken safety constraints, alter instruction priority, and make subsequent prompt-injection or policy-bypass attempts more effective.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file's user-facing documentation and CLI output are written exclusively in Chinese, which imposes a specific language/locale without any opt-in or alternative. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The tool persists raw task descriptions to a local JSON log under the user's home directory without any notice, consent flow, retention limit, or redaction. Because task descriptions can contain sensitive business, personal, or credential-like information, silent persistence increases the risk of unintended disclosure through local compromise, backups, shared accounts, or later reuse.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The application stores full user-provided task descriptions in plain language on disk, creating a semantic data-retention risk even if the file is only local. In this skill context, users may enter sensitive work requests, bid details, design materials, or other confidential content, so persistent plaintext storage materially increases exposure if the host or account is accessed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and later user-facing report strings are written exclusively in Chinese, indicating the skill is designed to communicate in a fixed language. The policy requires flagging language or locale constraints when the skill does not offer a user choice or document a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The tracker persists session metadata, notes, token usage, and derived session identifiers into predictable files under the user's home directory without any consent flow, minimization, or permission hardening. Even though it is local-only, those files may expose sensitive workflow details, session identifiers, or operational history to other local processes, backups, or users on misconfigured systems.

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 · tools/cost_tracker.py (reported line 86)May include surrounding context.

python
def poll_sessions(self) -> List[SessionSnapshot]:
        try:
            result = subprocess.run(["openclaw", "status"], capture_output=True, text=True, timeout=30)
            output = result.stdout + result.stderr
        except Exception as e:
            print(f"Failed to get openclaw status: {e}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The tool automatically scans recent markdown logs and reads their full contents from a user memory area without any consent gate, sensitivity filtering, or warning. If logs contain secrets, personal data, tokens, or internal prompts, the skill will ingest them wholesale and make them available for further processing, increasing privacy and data-exposure risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persists extracted content from logs into long-term memory files, potentially copying sensitive information into a more durable and discoverable location. This creates retention and secondary exposure risk because data that may have been transient is now stored indefinitely and can later be surfaced to other tools or users.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The usage text at L276 and the guidance at L300 tell users to invoke dream_consolidation.py run --force to actually delete consolidated logs, and the comment at L287-L288 describes this as the intended safe/force behavior. However, in the run branch the code parses sys.argv[2] as an integer day count before checking for --force (L284-L285), so run --force raises a ValueError instead of executing force mode. This is an active contradiction between documentation/comments and real behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language usage instructions in Chinese only, and the rest of the CLI messages are likewise Chinese-only. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is documented and justified, which it is not here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code reads full memory file contents and formats them for direct injection into agent context without any consent, disclosure, filtering, or sensitivity checks. If those memory files contain secrets, personal data, or prior sensitive prompts, the agent may expose or act on that data unexpectedly, especially because the function is explicitly designed to auto-inject retrieved memories into conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file presents its primary natural-language documentation entirely in Chinese, and later CLI help and status messages are also hard-coded in Chinese. That creates a language-policy issue because the skill does not offer any language or locale choice, nor document that it is intentionally region-specific.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · tools/permission_manager.py (reported line 10)May include surrounding context.

python
权限类型:
- read      — 读文件/数据
- write     — 写/创建文件
- execute   — 执行命令
- network   — 网络访问
- elevated  — 提升权限

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · tools/permission_manager.py (reported line 10)May include surrounding context.

python
权限类型:
- read      — 读文件/数据
- write     — 写/创建文件
- execute   — 执行命令
- network   — 网络访问
- elevated  — 提升权限

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 · tools/slash_commands.py (reported line 89)May include surrounding context.

python
def cmd_cost(self, args: str) -> str:
        """成本统计"""
        try:
            result = subprocess.run(
                ["python3", str(TOOLS_DIR / "cost_tracker.py")],
                capture_output=True, text=True, timeout=10
            )

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 · tools/slash_commands.py (reported line 100)May include surrounding context.

python
def cmd_status(self, args: str) -> str:
        """系统状态"""
        try:
            result = subprocess.run(
                ["openclaw", "status"],
                capture_output=True, text=True, timeout=10
            )

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 · tools/slash_commands.py (reported line 126)May include surrounding context.

python
def cmd_memory(self, args: str) -> str:
        """记忆状态"""
        try:
            result = subprocess.run(
                ["python3", str(TOOLS_DIR / "memory_relevance.py"), "scan"],
                capture_output=True, text=True, timeout=10
            )

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 · tools/slash_commands.py (reported line 152)May include surrounding context.

python
def cmd_tasks(self, args: str) -> str:
        """定时任务"""
        try:
            result = subprocess.run(
                ["openclaw", "cron", "list", "--json"],
                capture_output=True, text=True, timeout=10
            )