Install
openclaw skills install memory-scanScans OpenClaw agent memory files and workspace configs for malicious content, credential leaks, prompt injections, and security threats.
openclaw skills install memory-scanSecurity scanner for OpenClaw agent memory files
Scans MEMORY.md, daily logs (memory/*.md), and workspace configuration files for malicious content, prompt injection, credential leakage, and dangerous instructions that could compromise user security.
Detect security threats embedded in agent memory:
Scan all memory files:
python3 skills/memory-scan/scripts/memory-scan.py
Allow remote LLM analysis (redacted content only):
python3 skills/memory-scan/scripts/memory-scan.py --allow-remote
Scan specific file:
python3 skills/memory-scan/scripts/memory-scan.py --file memory/2026-02-01.md
Quiet mode (for automation):
python3 skills/memory-scan/scripts/memory-scan.py --quiet
JSON output:
python3 skills/memory-scan/scripts/memory-scan.py --json
Already included in safe-install daily audit - runs 2pm PT daily.
To add standalone cron:
bash skills/memory-scan/scripts/schedule-scan.sh
Requires:
OPENCLAW_ALERT_CHANNEL (configured in OpenClaw)OPENCLAW_ALERT_TO (optional, for channels that require a recipient)Creates cron job: daily at 3pm PT, sends alert only if threats found.
Add to HEARTBEAT.md:
## Weekly Memory Scan
Every Sunday, run memory scan:
python3 skills/memory-scan/scripts/memory-scan.py --quiet
On MEDIUM/HIGH/CRITICAL detection:
Auto-detects provider from OpenClaw config:
Remote LLM scanning is disabled by default. Use --allow-remote to enable
redacted LLM analysis.
To quarantine a detected threat:
python3 skills/memory-scan/scripts/quarantine.py memory/2026-02-01.md 42
Creates:
.memory-scan/quarantine/memory_2026-02-01_line42.backup[QUARANTINED BY MEMORY-SCAN: <timestamp>]scripts/memory-scan.py - Main scanner (local patterns + optional LLM with --allow-remote)scripts/schedule-scan.sh - Create cron job for daily scansscripts/quarantine.py - Quarantine detected threatsdocs/detection-prompt.md - LLM detection prompt template$ python3 skills/memory-scan/scripts/memory-scan.py
🧠 Memory Security Scan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning memory files...
✓ MEMORY.md - SAFE
✓ memory/2026-02-01.md - SAFE
⚠ memory/2026-01-30.md - MEDIUM (line 42)
→ Potential credential leakage: API key pattern detected
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overall: MEDIUM
Action: Review memory/2026-01-30.md:42
When user requests memory scan:
python3 skills/memory-scan/scripts/memory-scan.py