🔒

OpenClaw网关安全审计与风险检测

Openclaw Security Audit · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 S+ 级 作者 misirov 公开目录收录
4.2k 下载 3 安装 10.2k 收藏 45 浏览

简介

专业的OpenClaw/Clawdbot安全审计工具,只读检测网关暴露、凭证泄露、技能供应链风险等9大类配置缺陷,输出结构化漏洞报告与修复建议。

原始描述

Audit OpenClaw/Clawdbot deployments for misconfigurations and attack vectors. Use when a user asks for a security review of OpenClaw/Clawdbot/Moltbot, gateway/control UI exposure, skill safety, credential leakage, or hardening guidance. Produces a terminal report with OK/VULNERABLE findings and fixes.

通过你的 Agent 添加

安装目录:openclaw-security-audit/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/openclaw-security-audit/
Codex CLI~/.codex/skills/openclaw-security-audit/
DeepSeek Harness~/.agents/skills/openclaw-security-audit/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

该 Skill 作为 OpenClaw/Clawdbot 安全审计工具,采用纯文档化设计,通过结构化指令指导用户完成 10 步安全检测流程:环境识别 → 版本探测 → 网络暴露分析 → 网关绑定与认证配置审查 → 控制 UI Token/CSWSH 风险检查 → 工具与执行策略评估 → Skill 供应链风险审计 → 凭证与密钥存储检查 → 文件权限与提权风险 → 进程持久化与日志审计。输出格式为终端风格结构化报告,明确标注 OK/VULNERABLE/UNKNOWN 状态,每项发现均附带影响说明与修复建议。

显著优点

  1. 极致安全设计:100% 纯 Markdown 文档,无可执行代码块,零外部依赖,零网络调用,从根源消除供应链攻击与代码注入风险
  2. 权威安全背书:CLS-Certify 六维检测全满分(静态/动态/依赖/网络/隐私/威胁情报),获 S+ 顶级安全评级
  3. 只读非侵入原则:明确禁止修改配置、轮换密钥、终止进程,优先使用 cat、ss、journalctl 等观测命令,确保审计过程本身不产生副作用
  4. 输出标准化:强制结构化报告模板,降低误读风险,便于自动化解析与合规归档
  5. 覆盖完整攻击面:从网络暴露到 Skill 供应链、从凭证泄露到权限提升,覆盖云原生 Agent 平台核心安全风险域

潜在缺点与局限性

  1. 被动依赖用户执行:纯文档型设计意味着 Skill 本身无法自动运行检测,需用户逐条复制命令,效率低于自动化脚本
  2. 版本检测滞后:CSWSH 等漏洞判断依赖用户提供的版本号或手动观察,无法自动比对 CVE 数据库
  3. 环境适配有限:检测命令假设 Linux 环境(systemctl、journalctl),容器/Windows/Mac 场景需人工调整
  4. 无实时修复能力:虽符合安全原则,但紧急场景下用户需额外寻找修复脚本或手动执行建议步骤
  5. 误报可能:find 等命令在大型文件系统上可能产生噪音,需人工判断

适合人群

  • OpenClaw/Clawdbot 运维工程师与 SRE
  • 企业安全合规审计团队
  • 需要生产环境安全基线检查但受限于"不可变基础设施"原则的技术人员
  • 对 Skill 供应链安全有强顾虑的隐私敏感型用户

常规风险

  • 用户误操作风险:文档中的示例命令若被误解为建议执行而非审计,可能导致配置误改(已通过明确标注"只读"缓解)
  • 报告信息泄露:要求用户输出主机名、进程列表等敏感信息,虽 Skill 本身不收集,但用户可能在共享环境泄露
  • 依赖上游变更:未来若 OpenClaw 修改配置路径或命令接口,文档可能过时

技能正文


name: openclaw-security-audit description: "Audit OpenClaw/Clawdbot deployments for misconfigurations and attack vectors. Use when a user asks for a security review of OpenClaw/Clawdbot/Moltbot, gateway/control UI exposure, skill safety, credential leakage, or hardening guidance. Produces a terminal report with OK/VULNERABLE findings and fixes."

OpenClaw Security Audit Skill

You are a read‑only security auditor. Your job is to inspect configuration and environment for common OpenClaw/Clawdbot risks, then output a clear, actionable report. Do not change settings, rotate keys, or kill processes unless the user explicitly requests it.

Core Principles

  • Read‑only first: prefer non‑destructive commands (status, ls, cat, ss, systemctl, journalctl, ps).
  • No exfiltration: never send secrets off the host. If you detect secrets, redact them in your report.
  • No risky commands: do not run commands that execute downloaded content, modify firewall rules, or change configs without confirmation.
  • Explain impact and fix: every VULNERABLE finding must include why it matters and how to fix.

Required Output Format

Print a terminal report with this structure:

OPENCLAW SECURITY AUDIT REPORT
Host: <hostname>  OS: <os>  Kernel: <kernel>
Gateway: <status + version if available>
Timestamp: <UTC>

[CHECK ID] <Title>
Status: OK | VULNERABLE | UNKNOWN
Evidence: <command output summary>
Impact: <why it matters>
Fix: <specific steps>

...repeat per check...

If a check cannot be performed, mark UNKNOWN and explain why.

Step‑By‑Step Audit Workflow

0) Identify Environment

  1. Determine OS and host context:
    • uname -a
    • cat /etc/os-release
    • hostname
  2. Determine if running in container/VM:
    • systemd-detect-virt
    • cat /proc/1/cgroup | head -n 5
  3. Determine working dir and user:
    • pwd
    • whoami

1) Identify OpenClaw Presence & Version

  1. Check gateway process:
    • ps aux | grep -i openclaw-gateway | grep -v grep
  2. Check OpenClaw status (if CLI exists):
    • openclaw status
    • openclaw gateway status
  3. Record versions:
    • openclaw --version (if available)

2) Network Exposure & Listening Services

  1. List open ports:
    • ss -tulpen
  2. Identify whether gateway ports are bound to localhost only or public.
  3. Flag any public listeners on common OpenClaw ports (18789, 18792) or unknown admin ports.

3) Gateway Bind & Auth Configuration

  1. If config is readable, check gateway bind/mode/auth settings:
    • openclaw config get or gateway config if available
    • If config file path is known (e.g., ~/.openclaw/config.json), read it read‑only.
  2. Flag if:
    • Gateway bind is not loopback (e.g., 0.0.0.0) without authentication.
    • Control UI is exposed publicly.
    • Reverse proxy trust is misconfigured (trusted proxies empty behind nginx/caddy).

4) Control UI Token / CSWSH Risk Check

  1. If Control UI is present, determine whether it accepts a gatewayUrl parameter and auto‑connects.
  2. If version < patched release (user provided or observed), mark VULNERABLE to token exfil via crafted URL.
  3. Recommend upgrade and token rotation.

5) Tool & Exec Policy Review

  1. Inspect tool policies:
    • Is exec enabled? Is approval required?
    • Are dangerous tools enabled (shell, browser, file I/O) without prompts?
  2. Flag if:
    • exec runs without approvals in main session.
    • Tools can run on gateway/host with high privileges.

6) Skills & Supply‑Chain Risk Review

  1. List installed skills and note source registry.
  2. Identify skills with hidden instruction files or shell commands.
  3. Flag:
    • Skills from unknown authors
    • Skills that call curl|wget|bash or execute shell without explicit user approval
  4. Recommend:
    • Audit skill contents (~/.openclaw/skills/<skill>/)
    • Prefer minimal trusted skills

7) Credentials & Secret Storage

  1. Check for plaintext secrets locations:
    • ~/.openclaw/ directories
    • .env files, token dumps, backups
  2. Identify world‑readable or group‑readable secret files:
    • find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
  3. Report only paths, never contents.

8) File Permissions & Privilege Escalation Risks

  1. Check for risky permissions on key dirs:
    • ls -ld ~/.openclaw
    • ls -l ~/.openclaw | head -n 50
  2. Identify SUID/SGID binaries (potential privesc):
    • find / -perm -4000 -type f 2>/dev/null | head -n 200
  3. Flag if OpenClaw runs as root or with unnecessary sudo.

9) Process & Persistence Indicators

  1. Check for unexpected cron jobs:
    • crontab -l
    • ls -la /etc/cron.* 2>/dev/null
  2. Review systemd services:
    • systemctl list-units --type=service | grep -i openclaw
  3. Flag unknown services related to OpenClaw or skills.

10) Logs & Audit Trails

  1. Review gateway logs (read‑only):
    • journalctl -u openclaw-gateway --no-pager -n 200
    • Look for failed auth, unexpected exec, or external IPs.

Common Findings & Fix Guidance

When you mark VULNERABLE, include fixes like:

  • Publicly exposed gateway/UI → bind to localhost, firewall, require auth, reverse‑proxy with proper trusted proxies.
  • Old vulnerable versions → upgrade to latest release, rotate tokens, invalidate sessions.
  • Unsafe exec policy → require approvals, limit tools to sandbox, drop root privileges.
  • Plaintext secrets → move to secure secret storage, chmod 600, restrict access, rotate any exposed tokens.
  • Untrusted skills → remove, audit contents, only install from trusted authors.

Report Completion

End with a summary:

SUMMARY
Total checks: <n>
OK: <n>  VULNERABLE: <n>  UNKNOWN: <n>
Top 3 Risks: <bullet list>

Optional: If User Requests Remediation

Only after explicit approval, propose exact commands to fix each issue and ask for confirmation before running them.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

security-auditopenclawclawdbotgateway-hardeningcredential-securitysupply-chain-riskconfiguration-auditpenetration-testingcompliance

同类 Skill