OpenClaw网关安全审计与风险检测
简介
专业的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、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
该 Skill 作为 OpenClaw/Clawdbot 安全审计工具,采用纯文档化设计,通过结构化指令指导用户完成 10 步安全检测流程:环境识别 → 版本探测 → 网络暴露分析 → 网关绑定与认证配置审查 → 控制 UI Token/CSWSH 风险检查 → 工具与执行策略评估 → Skill 供应链风险审计 → 凭证与密钥存储检查 → 文件权限与提权风险 → 进程持久化与日志审计。输出格式为终端风格结构化报告,明确标注 OK/VULNERABLE/UNKNOWN 状态,每项发现均附带影响说明与修复建议。
显著优点
- 极致安全设计:100% 纯 Markdown 文档,无可执行代码块,零外部依赖,零网络调用,从根源消除供应链攻击与代码注入风险
- 权威安全背书:CLS-Certify 六维检测全满分(静态/动态/依赖/网络/隐私/威胁情报),获 S+ 顶级安全评级
- 只读非侵入原则:明确禁止修改配置、轮换密钥、终止进程,优先使用
cat、ss、journalctl 等观测命令,确保审计过程本身不产生副作用
- 输出标准化:强制结构化报告模板,降低误读风险,便于自动化解析与合规归档
- 覆盖完整攻击面:从网络暴露到 Skill 供应链、从凭证泄露到权限提升,覆盖云原生 Agent 平台核心安全风险域
潜在缺点与局限性
- 被动依赖用户执行:纯文档型设计意味着 Skill 本身无法自动运行检测,需用户逐条复制命令,效率低于自动化脚本
- 版本检测滞后:CSWSH 等漏洞判断依赖用户提供的版本号或手动观察,无法自动比对 CVE 数据库
- 环境适配有限:检测命令假设 Linux 环境(
systemctl、journalctl),容器/Windows/Mac 场景需人工调整
- 无实时修复能力:虽符合安全原则,但紧急场景下用户需额外寻找修复脚本或手动执行建议步骤
- 误报可能:
find 等命令在大型文件系统上可能产生噪音,需人工判断
适合人群
- OpenClaw/Clawdbot 运维工程师与 SRE
- 企业安全合规审计团队
- 需要生产环境安全基线检查但受限于"不可变基础设施"原则的技术人员
- 对 Skill 供应链安全有强顾虑的隐私敏感型用户
常规风险
- 用户误操作风险:文档中的示例命令若被误解为建议执行而非审计,可能导致配置误改(已通过明确标注"只读"缓解)
- 报告信息泄露:要求用户输出主机名、进程列表等敏感信息,虽 Skill 本身不收集,但用户可能在共享环境泄露
- 依赖上游变更:未来若 OpenClaw 修改配置路径或命令接口,文档可能过时
cat、ss、journalctl 等观测命令,确保审计过程本身不产生副作用- 被动依赖用户执行:纯文档型设计意味着 Skill 本身无法自动运行检测,需用户逐条复制命令,效率低于自动化脚本
- 版本检测滞后:CSWSH 等漏洞判断依赖用户提供的版本号或手动观察,无法自动比对 CVE 数据库
- 环境适配有限:检测命令假设 Linux 环境(
systemctl、journalctl),容器/Windows/Mac 场景需人工调整 - 无实时修复能力:虽符合安全原则,但紧急场景下用户需额外寻找修复脚本或手动执行建议步骤
- 误报可能:
find等命令在大型文件系统上可能产生噪音,需人工判断
适合人群
- OpenClaw/Clawdbot 运维工程师与 SRE
- 企业安全合规审计团队
- 需要生产环境安全基线检查但受限于"不可变基础设施"原则的技术人员
- 对 Skill 供应链安全有强顾虑的隐私敏感型用户
常规风险
- 用户误操作风险:文档中的示例命令若被误解为建议执行而非审计,可能导致配置误改(已通过明确标注"只读"缓解)
- 报告信息泄露:要求用户输出主机名、进程列表等敏感信息,虽 Skill 本身不收集,但用户可能在共享环境泄露
- 依赖上游变更:未来若 OpenClaw 修改配置路径或命令接口,文档可能过时
- 用户误操作风险:文档中的示例命令若被误解为建议执行而非审计,可能导致配置误改(已通过明确标注"只读"缓解)
- 报告信息泄露:要求用户输出主机名、进程列表等敏感信息,虽 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
- Determine OS and host context:
uname -acat /etc/os-releasehostname
- Determine if running in container/VM:
systemd-detect-virtcat /proc/1/cgroup | head -n 5
- Determine working dir and user:
pwdwhoami
1) Identify OpenClaw Presence & Version
- Check gateway process:
ps aux | grep -i openclaw-gateway | grep -v grep
- Check OpenClaw status (if CLI exists):
openclaw status
openclaw gateway status
- Record versions:
openclaw --version (if available)
2) Network Exposure & Listening Services
- List open ports:
ss -tulpen
- Identify whether gateway ports are bound to localhost only or public.
- Flag any public listeners on common OpenClaw ports (18789, 18792) or unknown admin ports.
3) Gateway Bind & Auth Configuration
- 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.
- 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
- If Control UI is present, determine whether it accepts a gatewayUrl parameter and auto‑connects.
- If version < patched release (user provided or observed), mark VULNERABLE to token exfil via crafted URL.
- Recommend upgrade and token rotation.
5) Tool & Exec Policy Review
- Inspect tool policies:
- Is
exec enabled? Is approval required?
- Are dangerous tools enabled (shell, browser, file I/O) without prompts?
- Flag if:
exec runs without approvals in main session.
- Tools can run on gateway/host with high privileges.
6) Skills & Supply‑Chain Risk Review
- List installed skills and note source registry.
- Identify skills with hidden instruction files or shell commands.
- Flag:
- Skills from unknown authors
- Skills that call
curl|wget|bash or execute shell without explicit user approval
- Recommend:
- Audit skill contents (
~/.openclaw/skills/<skill>/)
- Prefer minimal trusted skills
7) Credentials & Secret Storage
- Check for plaintext secrets locations:
~/.openclaw/ directories
.env files, token dumps, backups
- Identify world‑readable or group‑readable secret files:
find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
- Report only paths, never contents.
8) File Permissions & Privilege Escalation Risks
- Check for risky permissions on key dirs:
ls -ld ~/.openclaw
ls -l ~/.openclaw | head -n 50
- Identify SUID/SGID binaries (potential privesc):
find / -perm -4000 -type f 2>/dev/null | head -n 200
- Flag if OpenClaw runs as root or with unnecessary sudo.
9) Process & Persistence Indicators
- Check for unexpected cron jobs:
crontab -l
ls -la /etc/cron.* 2>/dev/null
- Review systemd services:
systemctl list-units --type=service | grep -i openclaw
- Flag unknown services related to OpenClaw or skills.
10) Logs & Audit Trails
- 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
ps aux | grep -i openclaw-gateway | grep -v grep
openclaw statusopenclaw gateway status
openclaw --version(if available)
- List open ports:
ss -tulpen
- Identify whether gateway ports are bound to localhost only or public.
- Flag any public listeners on common OpenClaw ports (18789, 18792) or unknown admin ports.
3) Gateway Bind & Auth Configuration
- 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.
- 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
- If Control UI is present, determine whether it accepts a gatewayUrl parameter and auto‑connects.
- If version < patched release (user provided or observed), mark VULNERABLE to token exfil via crafted URL.
- Recommend upgrade and token rotation.
5) Tool & Exec Policy Review
- Inspect tool policies:
- Is
exec enabled? Is approval required?
- Are dangerous tools enabled (shell, browser, file I/O) without prompts?
- Flag if:
exec runs without approvals in main session.
- Tools can run on gateway/host with high privileges.
6) Skills & Supply‑Chain Risk Review
- List installed skills and note source registry.
- Identify skills with hidden instruction files or shell commands.
- Flag:
- Skills from unknown authors
- Skills that call
curl|wget|bash or execute shell without explicit user approval
- Recommend:
- Audit skill contents (
~/.openclaw/skills/<skill>/)
- Prefer minimal trusted skills
7) Credentials & Secret Storage
- Check for plaintext secrets locations:
~/.openclaw/ directories
.env files, token dumps, backups
- Identify world‑readable or group‑readable secret files:
find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
- Report only paths, never contents.
8) File Permissions & Privilege Escalation Risks
- Check for risky permissions on key dirs:
ls -ld ~/.openclaw
ls -l ~/.openclaw | head -n 50
- Identify SUID/SGID binaries (potential privesc):
find / -perm -4000 -type f 2>/dev/null | head -n 200
- Flag if OpenClaw runs as root or with unnecessary sudo.
9) Process & Persistence Indicators
- Check for unexpected cron jobs:
crontab -l
ls -la /etc/cron.* 2>/dev/null
- Review systemd services:
systemctl list-units --type=service | grep -i openclaw
- Flag unknown services related to OpenClaw or skills.
10) Logs & Audit Trails
- 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
openclaw config getorgateway configif available- If config file path is known (e.g.,
~/.openclaw/config.json), read it read‑only.
- 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).
- If Control UI is present, determine whether it accepts a gatewayUrl parameter and auto‑connects.
- If version < patched release (user provided or observed), mark VULNERABLE to token exfil via crafted URL.
- Recommend upgrade and token rotation.
5) Tool & Exec Policy Review
- Inspect tool policies:
- Is
exec enabled? Is approval required?
- Are dangerous tools enabled (shell, browser, file I/O) without prompts?
- Flag if:
exec runs without approvals in main session.
- Tools can run on gateway/host with high privileges.
6) Skills & Supply‑Chain Risk Review
- List installed skills and note source registry.
- Identify skills with hidden instruction files or shell commands.
- Flag:
- Skills from unknown authors
- Skills that call
curl|wget|bash or execute shell without explicit user approval
- Recommend:
- Audit skill contents (
~/.openclaw/skills/<skill>/)
- Prefer minimal trusted skills
7) Credentials & Secret Storage
- Check for plaintext secrets locations:
~/.openclaw/ directories
.env files, token dumps, backups
- Identify world‑readable or group‑readable secret files:
find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
- Report only paths, never contents.
8) File Permissions & Privilege Escalation Risks
- Check for risky permissions on key dirs:
ls -ld ~/.openclaw
ls -l ~/.openclaw | head -n 50
- Identify SUID/SGID binaries (potential privesc):
find / -perm -4000 -type f 2>/dev/null | head -n 200
- Flag if OpenClaw runs as root or with unnecessary sudo.
9) Process & Persistence Indicators
- Check for unexpected cron jobs:
crontab -l
ls -la /etc/cron.* 2>/dev/null
- Review systemd services:
systemctl list-units --type=service | grep -i openclaw
- Flag unknown services related to OpenClaw or skills.
10) Logs & Audit Trails
- 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
- Is
execenabled? Is approval required? - Are dangerous tools enabled (shell, browser, file I/O) without prompts?
execruns without approvals in main session.- Tools can run on gateway/host with high privileges.
- List installed skills and note source registry.
- Identify skills with hidden instruction files or shell commands.
- Flag:
- Skills from unknown authors
- Skills that call
curl|wget|bashor execute shell without explicit user approval
- Recommend:
- Audit skill contents (
~/.openclaw/skills/<skill>/) - Prefer minimal trusted skills
- Audit skill contents (
7) Credentials & Secret Storage
- Check for plaintext secrets locations:
~/.openclaw/ directories
.env files, token dumps, backups
- Identify world‑readable or group‑readable secret files:
find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
- Report only paths, never contents.
8) File Permissions & Privilege Escalation Risks
- Check for risky permissions on key dirs:
ls -ld ~/.openclaw
ls -l ~/.openclaw | head -n 50
- Identify SUID/SGID binaries (potential privesc):
find / -perm -4000 -type f 2>/dev/null | head -n 200
- Flag if OpenClaw runs as root or with unnecessary sudo.
9) Process & Persistence Indicators
- Check for unexpected cron jobs:
crontab -l
ls -la /etc/cron.* 2>/dev/null
- Review systemd services:
systemctl list-units --type=service | grep -i openclaw
- Flag unknown services related to OpenClaw or skills.
10) Logs & Audit Trails
- 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
~/.openclaw/directories.envfiles, token dumps, backups
find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50
- Check for risky permissions on key dirs:
ls -ld ~/.openclawls -l ~/.openclaw | head -n 50
- Identify SUID/SGID binaries (potential privesc):
find / -perm -4000 -type f 2>/dev/null | head -n 200
- Flag if OpenClaw runs as root or with unnecessary sudo.
9) Process & Persistence Indicators
- Check for unexpected cron jobs:
crontab -l
ls -la /etc/cron.* 2>/dev/null
- Review systemd services:
systemctl list-units --type=service | grep -i openclaw
- Flag unknown services related to OpenClaw or skills.
10) Logs & Audit Trails
- 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
crontab -lls -la /etc/cron.* 2>/dev/null
systemctl list-units --type=service | grep -i openclaw
- 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.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。