← 返回
安全合规

Security Audit for OpenClaw

Logs risky OpenClaw agent actions, conducts activity audits, and reviews OpenClaw configs for security risks without blocking operations.
记录 OpenClaw 代理风险操作,执行活动审计并审查配置安全风险,不阻断业务运行。
n0nu
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 582
下载
💾 3
安装
1
版本
#latest

概述

Security Audit Skill

Lightweight, observer-only security layer for OpenClaw. Logs agent actions, audits activity history, and reviews OpenClaw config for risks. Does not block or interrupt any operations.

Quick Start

Three things this skill does:

  1. Log risky actions → call ./scripts/log_event.sh after notable operations
  2. Audit activity history → run ./scripts/run_audit.sh on request
  3. Audit OpenClaw config → run ./scripts/audit_config.sh on request

Core Behaviors

Logging Risky Actions (Observer Mode)

This skill is purely observational — it never blocks or delays any operation. After completing a risky action, log it:

./scripts/log_event.sh <level> <category> "<summary>" "<detail>" <action>

When to log:

LevelWhen
-------------
CRITICALRemote code execution (curl\bash), credential/key file reads, persistence writes (cron, authorized_keys, launchd), privilege escalation
WARNBulk file deletion, sensitive file reads, external requests with dynamic URLs, shell env modification
INFONormal workspace operations, standard dev tooling — skip unless building an audit trail

Categories: exec | file_write | network | credential | persistence

Actions: allowed | flagged

Note: blocked_soft is removed — this skill does not block. If something was risky but the user explicitly requested it, use allowed. Otherwise flagged.

Example:

./scripts/log_event.sh WARN exec "bulk delete outside workspace" "rm -rf /tmp/build" flagged
./scripts/log_event.sh CRITICAL credential "SSH key read" "cat ~/.ssh/id_rsa" allowed

Running Activity Audits

When user asks for a security audit or activity review:

./scripts/run_audit.sh 7   # last 7 days (default)
./scripts/run_audit.sh 30  # last 30 days

Read the output, then:

  • Highlight CRITICAL entries and explain what happened
  • Note any suspicious patterns (same WARN repeating, unexpected credential access)
  • If notify_on_audit_complete: true in config → send via message tool to configured channel

Auditing OpenClaw Config

When user asks "is my OpenClaw config secure?" or similar:

./scripts/audit_config.sh          # standard audit
./scripts/audit_config.sh --deep   # also probe live Gateway
./scripts/audit_config.sh --fix    # audit + apply safe fixes

This script delegates to openclaw security audit (the native CLI tool), which checks gateway auth, tool permissions, network exposure, file permissions, and other config foot-guns. Read the output and present findings to the user with context and recommendations.

Notification Setup

Users can enable proactive notifications by creating logs/security-audit-config.json:

{
  "notify_channel": "dingtalk",
  "notify_on": ["CRITICAL", "WARN"],
  "notify_on_audit_complete": true
}

Supported channels: whatever OpenClaw has configured (dingtalk, telegram, discord, etc.).

Default if file missing: log-only, no notifications.

When notify_on is set and you log a matching event, send a brief message via the message tool after logging.

Reference Files

  • dangerous-patterns.md — Comprehensive list of risky exec, file, and network patterns with examples
  • audit-guide.md — Log format, risk classification, notification config, report format
  • config-risks.md — OpenClaw config fields and their security implications

First-Time Setup

  1. logs/security-audit.log is created automatically on first event
  2. Offer to help create logs/security-audit-config.json for notifications
  3. Suggest adding a cron job via the cron skill for periodic audits (user sets interval)
  4. For config audit: no setup needed — runs on demand

What This Skill Does NOT Do

  • Block or delay any operation
  • Intercept other skills at runtime
  • Monitor the OpenClaw process itself
  • Replace proper OS-level access controls or sandboxing

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-20 05:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,704
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,142
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,594