Back to skill

Security audit

Claw Memory Guardian

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real memory and backup skill, but it needs Review because it stores long-lived potentially sensitive memory and has unsafe install and autosave behavior.

Install only if you are comfortable with a tool that keeps long-term local memory, backups, and git history of your work. Avoid storing secrets, regulated data, customer details, or confidential business information unless you have reviewed storage, backup, and sharing controls. Do not run the generated autosave script with untrusted workspace configuration, and check for existing memory-guardian binaries or skill directories before installation.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:128
Finding

Stored Shell Command Injection in Generated Autosave Script

Content
View full analysis
> "$LOG_FILE" while true; do # Create today's memory file if it does not exist TODAY=$(date +%Y-%m-%d) DAILY_FILE="$MEMORY_DIR/$TODAY.md" if [ ! -f "$DAILY_FILE" ]; then echo "# $TODAY" > "$DAILY_FILE" echo "" >> "$DAILY_FILE" echo "## Automatically created memory file" >> "$DAILY_FILE" echo "Created: $(date)" >> "$DAILY_FILE" echo "" >> "$DAILY_FILE" echo "## Today's Work" >> "$DAILY_FILE" echo "[$(date)] Created daily memory file: $TODAY.md" >> "$LOG_FILE" fi # Update the memory index timestamp INDEX_FILE="$MEMORY_DIR/memory_index.json" if [ -f "$INDEX_FILE" ]; then jq '.lastUpdated = "$(date -Iseconds)"' "$INDEX_FILE" > "$INDEX_FILE.tmp" && mv "$INDEX_FILE.tmp" "$INDEX_FILE" fi # Wait until the next save sleep ${this.config.autoSaveInterval} done `; const scriptPath = path.join(this.memoryPath, 'auto_save.sh'); await fs.writeFile(scriptPath, scriptContent); await fs.chmod(scriptPath, '755'); } ``` The project documentation instructs users to execute the generated file: ```bash bash memory/auto_save.sh & ``` ### Technical Analysis The `memoryGuardian` configuration object is loaded from the workspace's `config.json` without schema ...[truncated 2247 chars]
Remediation
View remediation
86400) { throw new Error('autoSaveInterval must be an integer between 10 and 86400 seconds'); } ``` 2. Avoid generating shell source from configuration. Implement autosave scheduling directly in Node.js with `setInterval`, or execute a fixed script while passing validated data as arguments. 3. If shell generation is retained: - Use a well-reviewed shell-escaping routine for every interpolated value. - Do not place untrusted values directly in command positions. - Pass values through positional parameters or a controlled environment. - Validate `OPENCLAW_WORKSPACE` before embedding it. 4. Write the generated file with restrictive permissions, such as `0700`, unless group or global execution is explicitly required. 5. Add tests using semicolons, command substitutions, quotation marks, newlines, and other shell metacharacters to confirm that configuration values cannot alter script syntax. ]]>

T08 · Insecure Dependencies

Note
Location
package.json:30
Finding

Non-Reproducible Runtime Dependencies Due to Mutable Version Ranges and Missing Lockfile

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (36)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README presents team memory sharing and customer interaction recording as benefits without mentioning consent, access controls, minimization, or compliance obligations. In this context, the skill is specifically designed to retain and share conversational/work memory, so encouraging storage of customer and team data without safeguards materially increases the risk of privacy violations and unauthorized disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The examples and instructions are presented exclusively in Chinese, which can amount to a language/locale constraint for users if no opt-in or alternative language path is provided. The file does not state that the skill is intentionally China-region or Chinese-language only, nor does it offer a language choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The examples encourage storing customer names, budgets, contracts, project details, and other potentially sensitive business data in the memory system without any privacy warning, minimization guidance, or redaction advice. This can lead users to place confidential or regulated data into local files, backups, or downstream sync targets, increasing the risk of unauthorized disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The configuration and backup examples discuss local config files, automatic saves, backups, and optional cloud sync but omit warnings about filesystem permissions, backup exposure, and third-party transfer risks. Users may assume these operations are safe by default and inadvertently expose sensitive memory contents through weak local protections or remote synchronization.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The examples document describes cloud backup as 'optional' in best practices, implying a bounded local-memory/backup use case, yet it explicitly includes regular synchronization to the cloud as part of the skill's operational guidance. For a memory-management skill, introducing cloud sync changes the data-handling intent by moving user memory off-device, which is materially different from purely local backup behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README promotes automatic saving, backup, and periodic git commits of user work without warning that sensitive prompts, secrets, proprietary code, or personal data may be captured and persist locally in version history. This creates a real privacy and data-retention risk because users may enable the feature without understanding that deleted content can remain recoverable in backups or git history.

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 · README.md (reported line 45)May include surrounding context.

clawdhub install claw-memory-guardian

或手动安装

mkdir -p ~/.openclaw/skills/claw-memory-guardian cp -r ./* ~/.openclaw/skills/claw-memory-guardian/

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The architecture and configuration describe storage of long-term memory, daily logs, knowledge bases, indexes, and backups in local files, but omit any warning that these may contain personal, business, or sensitive operational information. Because the skill's purpose is persistent memory capture, lack of disclosure about storage locations and sensitivity can lead users to expose confidential data on shared machines or insecure repositories.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file is written entirely in Chinese and does not indicate any user language choice, opt-in, or region-specific justification. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Most of the natural-language instructions and descriptions are written in Chinese, and the file does not offer users a language option or explain that the skill is intended only for a Chinese-language audience. This can constitute a language policy issue because it effectively forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
76% confidence
Finding

Although the persistence behavior matches the advertised purpose of the skill, the installation instructions use a broad copy operation and set up durable storage under the user's home directory. This makes the finding context-dependent: not malicious persistence, but still a real risk surface because sensitive data may remain on disk and be reused, synced, or backed up beyond user expectations.

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

clawdhub install claw-memory-guardian

或手动安装

mkdir -p ~/.openclaw/skills/claw-memory-guardian cp -r ./* ~/.openclaw/skills/claw-memory-guardian/

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
76% confidence
Finding

Although the persistence behavior matches the advertised purpose of the skill, the installation instructions use a broad copy operation and set up durable storage under the user's home directory. This makes the finding context-dependent: not malicious persistence, but still a real risk surface because sensitive data may remain on disk and be reused, synced, or backed up beyond user expectations.

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

clawdhub install claw-memory-guardian

或手动安装

mkdir -p ~/.openclaw/skills/claw-memory-guardian cp -r ./* ~/.openclaw/skills/claw-memory-guardian/

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes automatic save, backup, git commit, and recovery behavior without clearly warning users that it may modify local files and create persistent backups. This can lead to unanticipated writes, retention of sensitive data, and accidental disclosure if memory contents are committed or backed up without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The collaboration, sharing, and sync features imply transferring memory content to teammates or other AI systems, but the documentation gives no privacy or sensitivity warning. Because the stored memory may include project details, credentials, client data, or internal reasoning, users could unknowingly expose sensitive information through these features.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code presents its primary descriptions and CLI messages in Chinese throughout the file, beginning with the header comments and continuing in user-facing output. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installer unconditionally removes an existing skill directory and replaces it with its own contents if the target path already exists. This can destroy prior user data or a previously installed skill without explicit consent, making accidental overwrite and loss of local modifications likely during installation or upgrade.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script deletes any existing executable at the workspace bin path and recreates it without prompting the user or verifying ownership. This can overwrite a legitimate existing command, break workflows, or replace a user-managed binary with behavior controlled by the installed skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains user-facing natural-language strings in Chinese, beginning with the header comment and continuing throughout console output. The skill does not appear to provide any user opt-in or locale selection, which can violate a language/locale policy requiring neutrality or user choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script prints a success summary and publication-readiness message unconditionally, even if earlier checks reported missing files, parse errors, or incomplete configuration. In a release or review workflow, this can mislead operators into trusting a failed validation and shipping an unready or unsafe skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The test advertises validation of search functionality but only checks whether a hardcoded string contains a keyword, never invoking the actual search implementation. This can let broken, incomplete, or intentionally stubbed search logic ship undetected, creating false assurance about a core feature's behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This JavaScript file presents all natural-language comments and console output in Chinese, including uninstall warnings and status messages. The policy allows locale constraints only when users are given a choice or the restriction is clearly justified as region-specific, which is not evident here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese, including headings, instructions, and update notes. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative language or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file is entirely written in Chinese, beginning with a Chinese title, and does not indicate that contributors may use another language or that the project is intentionally Chinese-only. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The line '代码注释使用英文' requires code comments to be in English, but the document does not present this as an opt-in preference or explain a justified locale requirement. This is a language-policy restriction expressed in natural language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill documentation is entirely in Chinese and does not indicate that users can choose another language or that the skill is intended only for a Chinese-speaking audience. Under the policy, forcing or assuming a specific language without opt-in can be a natural-language policy issue unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.