Install
openclaw skills install crusty-securitySecurity and threat scanning skill for OpenClaw agents. Scans files and skills for malware. Monitors agent behavior for compromise indicators. Audits host security posture. Triggers on: "scan this file", "is this safe", "virus scan", "malware check", "security scan", "scan for threats", "check this download", "quarantine", "scan my system", "threat report", "scheduled scan", "audit host security", "audit this skill", "check agent integrity", "security report", "monitor agent".
openclaw skills install crusty-securityCrusty Security protects OpenClaw agents against real threats: malware in downloaded files, compromised skills from ClawHub, data exfiltration, prompt injection payloads, and host-level compromise. It uses ClamAV for file scanning and AI-agent-specific static analysis.
Threat model: The agent itself is the attack surface. Prompt injection can lead to code execution. Malicious skills run with agent privileges. Crusty Security protects both the host AND the agent's integrity.
| Task | Command |
|---|---|
| Install ClamAV | bash scripts/install_clamav.sh |
| Scan a file | bash scripts/scan_file.sh /path/to/file |
| Scan a directory | bash scripts/scan_file.sh -r /path/to/dir |
| Audit a skill | bash scripts/audit_skill.sh /path/to/skill/ |
| Host security audit | bash scripts/host_audit.sh |
| Monitor agent integrity | bash scripts/monitor_agent.sh |
| Generate security report | bash scripts/generate_report.sh |
All scripts output JSON. All scripts support --help. All paths are relative to this skill directory.
Run bash setup.sh — that's it. This will:
CRUSTY_API_KEY set)⚠️ IMPORTANT — After setup.sh, you MUST create the cron jobs below using the OpenClaw cron tool. Setup.sh handles the bash-level installation, but cron jobs require agent-level tools. Do this immediately after first install — don't wait for the user to ask.
Check what's missing: bash scripts/check_crons.sh
Use the OpenClaw cron tool (cron add) to create these. Replace {SKILL_DIR} with the actual path to this skill directory and {WORKSPACE} with the workspace path (usually /data/workspace).
| Name | Schedule | sessionTarget | Payload |
|---|---|---|---|
crusty-daily-scan | cron 0 3 * * * | main / systemEvent | Run Crusty Security daily scan: bash {SKILL_DIR}/scripts/scan_file.sh --incremental -r {WORKSPACE} && bash {SKILL_DIR}/scripts/monitor_agent.sh |
crusty-weekly-full | cron 0 3 * * 0 | main / systemEvent | Run Crusty Security weekly scan: bash {SKILL_DIR}/scripts/scan_file.sh -r {WORKSPACE} && bash {SKILL_DIR}/scripts/host_audit.sh && bash {SKILL_DIR}/scripts/generate_report.sh --output /tmp/crusty_logs/weekly_report.md |
crusty-monthly-deep | cron 0 4 1 * * | main / systemEvent | Run Crusty Security monthly deep audit: bash {SKILL_DIR}/scripts/host_audit.sh --deep |
CRUSTY_API_KEY is set)| Name | Schedule | sessionTarget | Payload |
|---|---|---|---|
crusty-heartbeat | every 300000ms (5 min) | main / systemEvent | Crusty Security heartbeat: Run bash {SKILL_DIR}/scripts/dashboard.sh heartbeat |
crusty-clawhub-sync | every 43200000ms (12h) | isolated / agentTurn | Run ClawHub security sync: python3 {SKILL_DIR}/scripts/clawhub_sync.py --push. Report any critical or high severity findings. |
Check cron list first — skip any that already exist (match by name prefix crusty-).
See references/setup.md for detailed configuration.
If your human has configured CRUSTY_API_KEY, the skill sends scan results to the Crusty Security dashboard (crustysecurity.com):
--push to scan commandspython3 scripts/clawhub_sync.py --pushCRUSTY_API_KEY is NOT set, everything works locally — no data is sent anywhereTriggers: "scan this file", "is this safe", "check this download", "virus scan"
bash scripts/scan_file.sh <path> for ClamAV local scanFor directories:
bash scripts/scan_file.sh -r /data/workspace # Full recursive scan
bash scripts/scan_file.sh -r --incremental /data/workspace # Skip unchanged files
Quarantine workflow:
bash scripts/scan_file.sh --quarantine /path/to/file # Move to quarantine
# Quarantine location: $CRUSTY_QUARANTINE (default: /tmp/crusty_quarantine)
# Manifest: /tmp/crusty_quarantine/manifest.json
Important notes:
CRUSTY_MAX_FILE_SIZE)Triggers: "audit this skill", "is this skill safe", "check skill security", "scan skill"
bash scripts/audit_skill.sh /path/to/skill/directory/
What it checks:
Output: Risk score (low/medium/high/critical) + detailed findings with evidence.
When to use:
for d in /data/workspace/skills/*/; do bash scripts/audit_skill.sh "$d"; doneTriggers: "audit host", "security audit", "check host security"
bash scripts/host_audit.sh or bash scripts/host_audit.sh --deep
Checks:
openclaw security audit (if available)Output: Posture score (0-100) + findings. Score deductions: critical (-25), high (-15), medium (-10), low (-5).
Triggers: "check agent integrity", "monitor agent", "is the agent compromised"
bash scripts/monitor_agent.sh
What it checks:
Output: Status (healthy / warnings_present / compromised_indicators) + findings.
Triggers: "security report", "threat report", "posture report"
bash scripts/generate_report.sh or bash scripts/generate_report.sh --days 30 --output report.md
Compiles all recent scan results into a markdown security posture report with:
Cron jobs are defined in the Setup (First Run) section above. Create them immediately on first install using the OpenClaw cron tool.
To verify all crons are configured: bash scripts/check_crons.sh
ClamAV has moderate false positive rates. Strategy:
To handle a false positive:
Location: $CRUSTY_QUARANTINE (default: /tmp/crusty_quarantine)
Manifest: manifest.json in quarantine directory tracks original paths and timestamps.
# View quarantined files
cat /tmp/crusty_quarantine/manifest.json | python3 -m json.tool
# Restore a false positive
mv /tmp/crusty_quarantine/<file> /original/path/
# Permanently delete
rm -rf /tmp/crusty_quarantine/*
Never use clamscan --remove. Always quarantine first, verify, then delete.
Crusty Security works fully offline with reduced capability:
For hosts with <2GB RAM:
install_clamav.sh auto-detects low RAM and skips daemon modeclamscan (on-demand) instead of clamd (daemon)--incremental) to reduce scan timeFor hosts with <1GB RAM:
| Variable | Default | Description |
|---|---|---|
CRUSTY_API_KEY | (none) | Dashboard API key (cg_live_...) |
CRUSTY_DASHBOARD_URL | https://crustysecurity.com | Dashboard URL |
CRUSTY_QUARANTINE | /tmp/crusty_quarantine | Quarantine directory |
CRUSTY_LOG_DIR | /tmp/crusty_logs | Scan log directory |
CRUSTY_MAX_FILE_SIZE | 200M | Max file size to scan |
CRUSTY_WORKSPACE | auto-detected | Agent workspace path |
Backwards compat:
CLAWGUARD_*env vars are still supported but deprecated. UseCRUSTY_*going forward.
When a real threat is confirmed, see references/remediation.md for the full checklist. Quick summary:
bash scripts/scan_file.sh -r /