Back to skill

Security audit

Agent Memory Continuity

Security checks for vulnerabilities and agentic risk

Overview

This memory skill has a coherent purpose, but it installs recurring local execution and stores conversation history with weak scoping and a real cron command-injection risk.

Review this carefully before installing. Only run it in a workspace where persistent plaintext memory is acceptable, avoid sensitive secrets or personal data in conversations it may record, and do not run the activation script with an untrusted or unusual workspace path. Check and remove any cron entry it creates if you stop using it.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/activate-memory-sync.sh:5
Finding

Persistent Cron Command Injection Through an Unescaped Workspace Path

Content
View full analysis
/dev/null 2>&1; then echo "ℹ️ Cron not available - using file-based sync tracking" echo "$(date): Memory sync activated (file-based)" >> .memory-sync-log echo "✅ File-based memory sync activated" exit 0 fi # Add cron job for memory sync (every 6 hours) CRON_JOB="0 */6 * * * cd $WORKSPACE && bash scripts/sync-memory.sh >> .memory-sync-log 2>&1" # Check if cron job already exists if crontab -l 2>/dev/null | grep -q "sync-memory.sh"; then echo "✅ Memory sync cron job already active" else # Add to crontab (crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab - 2>/dev/null || true ``` ### Technical Analysis The script accepts the workspace path from its first argument and confirms only that the shell can change to it. It then inserts that path directly into a crontab command without shell quoting or escaping. Cron executes command fields through a shell. Consequently, shell metacharacters in the workspace path—such as semicolons, command substitutions, redirection operators, or line-breaking characters—can change the meaning of the installed command. Quoting `"$WORKSPACE"` during the initial `cd` does not protect its later interpolation into `CRON_JOB`. The generated command is persistent and runs every six hours. The script also suppresses errors from `crontab` and unconditionally reports successful activation, making installation failures or unexpected modifications harder to detect. ### Attack Path 1. An attacker creates or controls a directory whose path contains shell syntax, or convinces the user to provide such a path as the workspace argument. 2. The user runs: ```bash bash scripts/activate-memory-sync.sh ...[truncated 970 chars]
Remediation
View remediation
/dev/null || true`. 8. Provide a documented uninstall command that removes only the Skill's own marked cron entry. 9. Avoid running the installer or activation script as root. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sync-memory.sh:16
Finding

Recurring Task Permanently Deletes Memory Files Without Enforcing the Declared Retention Policy

Content
View full analysis
> MEMORY.md echo "## $(date +%Y-%m-%d)" >> MEMORY.md cat "$TODAY_MEMORY" >> MEMORY.md fi fi # Clean up old memory files (keep last 30 days) find memory/ -name "*.md" -mtime +30 -delete 2>/dev/null || true echo "$(date): Memory sync completed" ``` The declared configuration does not match this behavior: ```json "archival": { "enabled": true, "archive_after_days": 30, "retention_months": 12 } ``` ### Technical Analysis Every synchronization run invokes `find ... -delete` and permanently removes matching Markdown files older than 30 days. The script does not read `.memory-config.json`, check whether archival is enabled, archive data before removal, or implement the declared 12-month retention period. Because this script is invoked by the installed six-hour cron task, deletion occurs automatically and repeatedly. Errors are discarded and ignored, preventing administrators from reliably detecting cleanup failures or unexpected behavior. Although the daily content may previously have been copied into `MEMORY.md`, that aggregation is not equivalent to the advertised archival behavior and may not preserve metadata, later edits, file boundaries, or content excluded by the date-detection logic. ### Attack Path 1. The user enables automated memory synchronization. 2. Daily memory files accumulate in the workspace's `memory/` directory. 3. A file's modification time b ...[truncated 845 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
templates/daily-memory-template.md:3
Finding

Sensitive Conversation Context Is Persisted in Plaintext Without Access Controls or Effective Aggregate Retention

Content
View full analysis
> MEMORY.md echo "## $(date +%Y-%m-%d)" >> MEMORY.md cat "$TODAY_MEMORY" >> MEMORY.md fi fi ``` ### Technical Analysis The templates direct the Agent to preserve conversations, preferences, behavioral patterns, project details, configurations, and decision reasoning. These categories can contain personal information, proprietary project data, access details, infrastructure information, or secrets accidentally disclosed during a conversation. The installer and synchronization scripts do not establish a restrictive `umask`, apply explicit fi ...[truncated 1490 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Note
Location
templates/AGENT_MEMORY_PROTOCOL.md:1
Finding

Installed Protocol Unconditionally Alters Agent Behavior Across Future Sessions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill markets itself as providing robust memory continuity, but the analysis indicates the implementation may only append to local files and delete older data, without actually delivering the claimed search-first behavior. This mismatch is dangerous because users may trust it with important continuity or recordkeeping assumptions that are not met, leading to hidden data loss or false confidence.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill markets itself as providing robust memory continuity, but the analysis indicates the implementation may only append to local files and delete older data, without actually delivering the claimed search-first behavior. This mismatch is dangerous because users may trust it with important continuity or recordkeeping assumptions that are not met, leading to hidden data loss or false confidence.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
Does your OpenClaw agent suffer from "conversation amnesia"? Starting fresh every session? Forgetting previous discussions, decisions, and context? You're not alone - this is the #1 frustration with AI agents.

## The Solution
**Agent Memory Continuity** solves fragmented conversations through a battle-tested **search-first protocol** that ensures agents never forget previous context.

## Why This Skill?
- ✅ **Solves universal pain point** - Every OpenClaw user faces memory issues

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/activate-memory-sync.sh (reported line 21)May include surrounding context.

sh
2>&1; then
    echo "ℹ️  Cron not available - using file-based sync tracking"
    echo "$(date): Memory sync activated (file-based)" >> .memory-sync-log
    echo "✅ File-based memory sync activated"
    exit 0
fi

# Add cron job for memory sync (every 6 hours)
CRON_JOB="0 */6 * * * cd $WORKSPACE && bash scripts/sync-memory.sh >> .memory-sync-log 2>&1"

# Check if cron job already exists
if crontab -l 2>/dev/null | grep -q "sync-memory.sh"; then
    echo "✅ Memory sync cron job already active"
else
    # Add to crontab
    (crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab - 2>/dev/null || true
    echo "✅ Memory sync cron job activated (every 6 hours)"
fi

echo "🧠 Memory continuity system is now active!"
echo "📊 Check sync status: cat .memory-sync-log"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs users to run multiple shell scripts and configure cron jobs, but the manifest does not declare any tool scope or allowed shell usage. This reduces transparency and prevents users or platforms from understanding the operational footprint before installation, which is risky for a skill that performs persistent local changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes persistent memory logging, context reconstruction, and cross-session syncing without prominently warning users that conversation content may be stored long-term. In a memory-oriented skill, that context makes the omission more dangerous because users are likely to feed it sensitive operational or personal data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

Using npx clawhub without a pinned version allows execution of whatever package version is current at install time. If the upstream package is compromised or changes behavior, users may run unreviewed code during installation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The installation steps instruct users to activate memory sync and create cron-based automation, but do not warn that background scheduled tasks will be installed and continue running. Persistent automation changes system behavior over time and can create privacy, resource, and maintainability risks if users are not clearly informed.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

The skill references cron persistence and troubleshooting for installed scheduled jobs, confirming that it establishes behavior surviving beyond a single session. Session persistence is not inherently malicious, but it is security-relevant because it can continue collecting or modifying data after the initial user action, especially in a memory-logging skill.

Content

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

Cron jobs not running:

bash
# Check cron status
crontab -l | grep memory

# Reinstall cron jobs
bash scripts/activate-memory-sync.sh --force

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The red_flags list contains very common conversational phrases such as 'you said earlier' and 'remember when', which can trigger memory-retrieval behavior during ordinary dialogue. In a memory-continuity skill, this increases the chance of unnecessary searches, retrieval of unrelated prior context, and inadvertent exposure or propagation of stored user information across conversations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list is intentionally generic and contains many common phrases such as 'current work', 'important context', 'previous discussions', and 'meeting notes' that are likely to appear in ordinary user prompts. In a memory-continuity skill, this can cause memory searches to be invoked too often, expanding retrieval scope unnecessarily and increasing the chance of pulling unrelated or sensitive prior context into the current interaction.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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 · docs/troubleshooting.md (reported line 11)May include surrounding context.

md
### Issue: "Memory files not syncing"
**Solution:** 
1. Check if cron is running: `systemctl status cron`
2. Verify cron job: `crontab -l | grep memory`
3. Check sync log: `cat .memory-sync-log`

### Issue: "Daily memory file not created"

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The comment and associated logic indicate intentional setup of recurring scheduled execution for memory sync, which is a persistence mechanism. In this skill's context, persistence is more dangerous because it affects the host outside the repository and may not be expected from a context-preservation feature.

Content

Scanner excerpt · scripts/activate-memory-sync.sh (reported line 17)May include surrounding context.

sh
exit 0
fi

# Add cron job for memory sync (every 6 hours)
CRON_JOB="0 */6 * * * cd $WORKSPACE && bash scripts/sync-memory.sh >> .memory-sync-log 2>&1"

# Check if cron job already exists

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persistently modifies the user's crontab to run another script every 6 hours, which changes host-level scheduler state beyond the immediate action a user might expect from a memory-continuity skill. Even if the goal is legitimate, silent persistence increases risk because it creates recurring execution and can outlive the current session or repository trust decision.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Directly invoking crontab grants the skill a persistence mechanism on the host, which is more privileged and invasive than ordinary workspace-local memory management. In skill context this is especially sensitive because the stated purpose is context preservation, not host scheduler modification, so users may not anticipate the persistence side effect.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Checking existing crontab entries is part of establishing persistent execution, which is a recognized persistence behavior. While not inherently malicious, recurring execution of repository-controlled code can be abused if the repo contents later change or if the workspace path points to untrusted content.

Content

Scanner excerpt · scripts/activate-memory-sync.sh (reported line 21)May include surrounding context.

sh
CRON_JOB="0 */6 * * * cd $WORKSPACE && bash scripts/sync-memory.sh >> .memory-sync-log 2>&1"

# Check if cron job already exists
if crontab -l 2>/dev/null | grep -q "sync-memory.sh"; then
    echo "✅ Memory sync cron job already active"
else
    # Add to crontab

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

This line appends a new cron entry to the user's crontab, creating ongoing execution of a script from the workspace. Persistent scheduled execution is dangerous because it survives the initial run and can later execute altered code without renewed user approval.

Content

Scanner excerpt · scripts/activate-memory-sync.sh (reported line 24)May include surrounding context.

sh
if crontab -l 2>/dev/null | grep -q "sync-memory.sh"; then
    echo "✅ Memory sync cron job already active"
else
    # Add to crontab
    (crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab - 2>/dev/null || true
    echo "✅ Memory sync cron job activated (every 6 hours)"
fi

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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 · scripts/activate-memory-sync.sh (reported line 25)May include surrounding context.

sh
echo "✅ Memory sync cron job already active"
else
    # Add to crontab
    (crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab - 2>/dev/null || true
    echo "✅ Memory sync cron job activated (every 6 hours)"
fi

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script performs automatic deletion of files under memory/ older than 30 days with no user confirmation, dry-run mode, or explicit opt-in. In an agent-memory skill, those files may contain the only retained historical context, so silent cleanup can cause irreversible data loss and unexpected degradation of behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The protocol explicitly instructs the agent to search prior memory files and log significant decisions to persistent storage, but it provides no requirement to obtain user consent, disclose that prior-session context will be accessed, or limit what may be stored. This creates a privacy and data-governance risk because sensitive user information from prior conversations can be silently retrieved, retained, and reused beyond the user's expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template explicitly instructs the agent to record user preferences, behavior patterns, conversation context, and future priorities without any guidance on data minimization, consent, sensitivity filtering, or retention limits. In a memory-continuity skill, this creates a real privacy risk because operators may persist personal or sensitive user information across sessions in a way users do not expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The search_patterns are broad and semantically open-ended, including categories like 'previous conversations' and 'important context' without scope restrictions. In this skill, underspecified retrieval criteria can cause overcollection or overbroad recall of stored memory, increasing the risk of irrelevant or sensitive context being surfaced when continuity logic activates.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

All cron jobs hard-code the timezone to "UTC," which imposes a specific locale setting without indicating user choice or documented justification. This may violate language/locale policy expectations when the skill is used in environments where local time behavior matters.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.