memory-scanScans OpenClaw agent memory files and workspace configs for malicious content, credential leaks, prompt injections, and security threats.
Install via ClawdBot CLI:
clawdbot install dgriffin831/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: ] 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.pyGenerated Mar 1, 2026
A cybersecurity firm uses the memory-scan skill to routinely audit its AI agents' memory files for any inadvertent credential leakage or malicious instructions injected during client interactions. This ensures compliance with data protection regulations and maintains client trust by proactively identifying and quarantining security threats before they escalate.
A bank integrates memory-scan into its AI-driven customer service agents to detect prompt injection attempts or data exfiltration commands that could compromise sensitive financial data. Scheduled daily scans help meet regulatory requirements for internal security audits and prevent unauthorized behavioral manipulation of AI systems.
A healthcare provider employs memory-scan to monitor AI agents handling patient data, scanning for credential leaks or malicious instructions that could violate HIPAA regulations. The skill's alert workflow ensures immediate review of medium to critical threats, safeguarding patient privacy and preventing data breaches in clinical workflows.
An e-commerce company uses memory-scan to analyze AI agent memories for patterns of guardrail bypass or privilege escalation attempts by malicious users. This helps detect and quarantine threats that could lead to fraudulent transactions or unauthorized access to customer accounts, enhancing overall platform security.
A research lab implements memory-scan to audit AI agents involved in experimental data analysis, ensuring no prompt injections or malicious instructions compromise research integrity. The skill's integration with safe-install for daily audits provides continuous monitoring, critical for maintaining ethical AI use in sensitive scientific environments.
Offer memory-scan as a cloud-based service where businesses pay a monthly fee for automated AI memory scanning and threat alerts. Revenue is generated through tiered subscriptions based on scan frequency, number of agents monitored, and access to advanced features like remote LLM analysis and detailed reporting.
Sell enterprise licenses for on-premises deployment of memory-scan, including custom integration with existing AI systems and dedicated support. Revenue comes from one-time license fees plus annual maintenance contracts for updates, priority support, and training services tailored to large organizations.
Provide a free version of memory-scan with basic local scanning capabilities, while charging for premium features such as scheduled monitoring, advanced LLM analysis, and integration with third-party security tools. Revenue is generated through upgrades and add-ons for businesses needing enhanced security and automation.
š¬ Integration Tip
Integrate memory-scan with existing cron jobs or CI/CD pipelines for automated daily audits, and configure alert channels in OpenClaw to ensure immediate notification of threats without manual intervention.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
Perform a comprehensive read-only security audit of Clawdbot's own configuration. This is a knowledge-based skill that teaches Clawdbot to identify hardening opportunities across the system. Use when user asks to "run security check", "audit clawdbot", "check security hardening", or "what vulnerabilities does my Clawdbot have". This skill uses Clawdbot's internal capabilities and file system access to inspect configuration, detect misconfigurations, and recommend remediations. It is designed to be extensible - new checks can be added by updating this skill's knowledge.
Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers, handling secrets, input validation, SQL injection prevention, XSS protection, or any security-related code review.
Security check for ClawHub skills powered by Koi. Query the Clawdex API before installing any skill to verify it's safe.
Scan Clawdbot and MCP skills for malware, spyware, crypto-miners, and malicious code patterns before you install them. Security audit tool that detects data exfiltration, system modification attempts, backdoors, and obfuscation techniques.