Loading...
Loading...
Automated daily security audits for OpenClaw agents with email reporting. Runs deep audits and sends formatted reports.
npx skill4agent add prompt-security/clawsec openclaw-audit-watchdog~/.openclaw/skills/openclaw-audit-watchdog/openclaw security audit --jsonopenclaw security audit --deep --jsonexport PROMPTSEC_DM_CHANNEL="telegram"
export PROMPTSEC_DM_TO="@yourhandle"
export PROMPTSEC_TZ="America/New_York"
export PROMPTSEC_HOST_LABEL="prod-server-01"
# Then invoke the skill
/openclaw-audit-watchdogUser: /openclaw-audit-watchdog
Agent: Setting up daily security audit watchdog...
What channel should I use for delivery? (e.g., telegram, slack)
User: telegram
Agent: What's the recipient ID or handle?
User: @myhandle
Agent: Which timezone for the 23:00 daily run? (default: UTC)
User: America/Los_Angeles
Agent: ✓ Created cron job "Daily security audit (Prompt Security)"
Schedule: Daily at 23:00 America/Los_Angeles
Delivery: telegram → @myhandleUser: /openclaw-audit-watchdog
Agent: Found existing "Daily security audit (Prompt Security)" job.
Current: Daily at 23:00 UTC → telegram:@oldhandle
Update delivery target? (current: telegram:@oldhandle)
User: slack:#security-alerts
Agent: ✓ Updated cron job
Schedule: Daily at 23:00 UTC
Delivery: slack:#security-alerts🔭 Daily Security Audit Report
Host: prod-server-01
Time: 2026-02-16 23:00:00 America/New_York
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Standard Audit: 12 checks passed, 2 warnings
✓ Deep Audit: 8 probes passed, 1 critical
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CRITICAL FINDINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[CRIT-001] Unencrypted API Keys Detected
→ Remediation: Move credentials to encrypted vault or use environment variables
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[WARN-003] Outdated Dependencies Found
→ Remediation: Run `openclaw security audit --fix` to update
[WARN-007] Weak Permission on Config File
→ Remediation: chmod 600 ~/.openclaw/config.json
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Run `openclaw security audit --deep` for full details.# Run every 6 hours instead of daily
export PROMPTSEC_SCHEDULE="0 */6 * * *"
/openclaw-audit-watchdog# On dev server
export PROMPTSEC_HOST_LABEL="dev-01"
export PROMPTSEC_DM_TO="@dev-team"
/openclaw-audit-watchdog
# On prod server
export PROMPTSEC_HOST_LABEL="prod-01"
export PROMPTSEC_DM_TO="@oncall"
/openclaw-audit-watchdog--enable-suppressions"enabledFor": ["audit"]# Create or edit the suppression config
cat > ~/.openclaw/security-audit.json <<'JSON'
{
"enabledFor": ["audit"],
"suppressions": [
{
"checkId": "skills.code_safety",
"skill": "clawsec-suite",
"reason": "First-party security tooling — reviewed by security team",
"suppressedAt": "2026-02-15"
}
]
}
JSON
# Run with suppressions enabled
/openclaw-audit-watchdog --enable-suppressions--enable-suppressions"enabledFor""audit"--config <path>OPENCLAW_AUDIT_CONFIG~/.openclaw/security-audit.json.clawsec/allowlist.json{
"enabledFor": ["audit"],
"suppressions": [
{
"checkId": "skills.code_safety",
"skill": "clawsec-suite",
"reason": "First-party security tooling — reviewed by security team",
"suppressedAt": "2026-02-15"
}
]
}"enabledFor": ["audit"]--enable-suppressions"enabledFor": ["advisory"]"enabledFor": ["audit", "advisory"]enabledForskills.code_safetyPROMPTSEC_DM_CHANNELtelegramPROMPTSEC_DM_TOPROMPTSEC_TZUTCPROMPTSEC_HOST_LABELhostnamePROMPTSEC_INSTALL_DIRcd~/.config/security-checkupPROMPTSEC_GIT_PULL=1git pull --ff-onlybashzshPROMPTSEC_INSTALL_DIR="$HOME/.config/security-checkup"'$HOME/.config/security-checkup'$env:PROMPTSEC_INSTALL_DIR = Join-Path $HOME ".config/security-checkup"$HOMEcronschedule.kind="cron"schedule.expr="0 23 * * *"schedule.tz=<installer tz>sessionTarget="isolated"wakeMode="now"payload.kind="agentTurn"payload.deliver=trueopenclaw security audit --jsonopenclaw security audit --deep --jsoncheckIdtitlemessagemessage(action="send", channel="email", target="target@example.com", message=<report>)execprintf "%s" "$REPORT" | /usr/sbin/sendmail -t"NOTE: could not deliver to target@example.com (email channel not configured)"cron.list(includeDisabled=true)"Daily security audit""Daily security audit (Prompt Security)"openclaw security audit --fix