返回顶部
a

audit-openclaw-security审计加固OpenClaw

Audit and harden OpenClaw deployments and interpret `openclaw security audit` findings. Use when the user wants to secure OpenClaw, review gateway exposure/auth/reverse proxies/Tailscale Serve or Funnel, check DM/group access (pairing, allowlists, mention gating, `session.dmScope`), minimise tool permissions and sandboxing, review plugins/skills/secrets/transcripts/log retention, or lock down Docker/macOS/laptop/EC2 installs. Not for generic OS, Docker, or cloud hardening unrelated to OpenClaw.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.1
安全检测
已通过
894
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

audit-openclaw-security

技能名称: audit-openclaw-security

详细描述:

audit-openclaw-security

对 OpenClaw 部署执行防御性、授权式安全审计,并将结果转化为实用的修复计划。

此版本针对 OpenClaw 2026.3.8 进行了调整,并在引用命令中的捆绑脚本时使用 {baseDir}。

防护栏

  1. 1. 仅审计用户拥有或明确获得评估权限的系统。
  2. 绝不要求提供原始机密信息。 不得请求网关令牌/密码、模型 API 密钥、会话 Cookie、OAuth 凭证或原始凭证文件。
  3. 优先选择设计为可共享或可编辑的输出:
* openclaw status --all * openclaw status --deep * openclaw gateway probe --json * openclaw security audit --json * openclaw security audit --deep --json
  1. 4. 将网关控制界面浏览器控制配对节点自动化界面视为操作员级别的访问权限。
  2. 默认为仅审计。在进行任何配置编辑、--fix 操作、防火墙更改或重启之前,请先创建备份并获得用户的明确批准。
  3. 当用户想要修复时,明确备份步骤:
* openclaw backup create --verify * 如果配置无效但您仍需要状态和凭证,请使用 --no-include-workspace * 如果用户只想在编辑前获得最小的安全副本,请使用 --only-config

“良好”状态的标准

  • * 除非有经过深思熟虑且有防御措施的特定原因,否则网关应绑定到 loopback
  • 已启用强网关身份验证。
  • 无意外的公共暴露(LAN 绑定、端口转发、宽松的反向代理、Tailscale Funnel)。
  • 控制界面要么是 localhost/Serve,要么在受信任的代理后面明确限制来源。
  • 私信需要配对或严格的允许列表。
  • 群组需要提及门控,并且如果启用了广泛的工具,则不应开放。
  • session.dmScope 已适当隔离:
* 对于大多数多用户设置,使用 per-channel-peer * 当同一提供商运行多个账户时,使用 per-account-channel-peer
  • * 工具遵循最小权限原则:
* 对于面向收件箱的代理,使用 tools.profile: messaging 或更严格的设置 * 在不受信任的界面上拒绝 group:runtime、group:fs、group:automation * tools.fs.workspaceOnly: true * tools.exec.security: deny 或至少需要批准门控 * tools.elevated.enabled: false,除非有狭窄、明确的需求
  • * 插件和技能是明确受信任的、最小可写性的,并且不被用作简单的持久化路径。
  • 机密信息、对话记录和日志具有严格的权限和明确的保留计划。

逐步使用捆绑文件

仅打开任务所需的额外文件:

  • * references/command-cheatsheet.md — 精确的命令阶梯
  • references/openclaw-audit-checks.md — 当前高信号 checkId 词汇表
  • references/openclaw-baseline-config.md — 安全基线片段
  • references/platform-mac-mini.md
  • references/platform-personal-laptop.md
  • references/platform-docker.md
  • references/platform-aws-ec2.md
  • assets/report-template.md — 报告结构

步骤 0 — 快速建立上下文

收集足够的上下文以选择审计路径:

  • * OpenClaw 运行在哪里?
* macOS 主机 / Mac mini * 个人笔记本电脑 * Docker 主机 * EC2 / VPS / 其他云虚拟机
  • * 安装方式?
* 本地安装 * Docker / Compose * 源码检出
  • * 我们是否有本地 shell 访问权限?
* 模式 A:仅聊天 / 用户运行命令 * 模式 B:代理可以直接运行 shell 命令

模式 A — 辅助自助审计(仅聊天)

要求用户在 OpenClaw 主机上运行以下命令并分享输出。

最小审计集

bash
openclaw --version
openclaw status --all
openclaw status --deep
openclaw gateway status
openclaw gateway probe --json
openclaw channels status --probe
openclaw doctor
openclaw security audit --json
openclaw security audit --deep --json

有用的额外命令

bash
openclaw health --json
openclaw backup create --dry-run --json
openclaw backup create --only-config --dry-run --json
openclaw skills list --eligible --json
openclaw plugins list --json

安全的目标配置读取

优先选择目标读取而非完整的配置转储:

bash
openclaw config get gateway.bind
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.allowTailscale
openclaw config get gateway.controlUi.allowedOrigins
openclaw config get gateway.trustedProxies
openclaw config get gateway.allowRealIpFallback
openclaw config get discovery.mdns.mode
openclaw config get session.dmScope
openclaw config get tools.profile
openclaw config get tools.fs.workspaceOnly
openclaw config get tools.exec.security
openclaw config get tools.elevated.enabled
openclaw config get channels.defaults.dmPolicy
openclaw config get channels.defaults.groupPolicy
openclaw config get logging.redactSensitive

私信 / 群组跟进检查

如果问题是“机器人在线但私信或群组行为异常”,请检查配对和提及门控:

bash
openclaw pairing list

的示例包括 discord、slack、signal、telegram、whatsapp、matrix、imessage 和 bluebubbles。

如果用户必须分享配置

OpenClaw 配置通常是类似 JSON5 的格式。在分享前进行编辑:

bash
python3 {baseDir}/scripts/redactopenclawconfig.py ~/.openclaw/openclaw.json > openclaw.json.redacted

主机 / 网络快照

macOS

bash
whoami
sw_vers
uname -a
lsof -nP -iTCP -sTCP:LISTEN
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode
fdesetup status || true

Linux / 云虚拟机

bash
whoami
cat /etc/os-release
uname -a
ss -ltnp
sudo ufw status verbose || true
sudo nft list ruleset || true
sudo iptables -S || true

Docker / Compose

bash
docker ps --format table {{.Names}} {{.Image}} {{.Ports}}
docker compose ps || true
docker port openclaw-gateway 18789 || true

模式 B — 自动化本地审计(Shell 访问)

运行捆绑的收集器和报告渲染器:

bash
bash {baseDir}/scripts/collectopenclawaudit.sh --out ./openclaw-audit
python3 {baseDir}/scripts/render_report.py --input ./openclaw-audit --output ./openclaw-security-report.md

然后审查 openclaw-security-report.md,根据需要优化措辞,并将最终报告呈现给用户。

关于收集器的说明

  • * 它默认是只读的
  • 运行 openclaw security audit --fix。
  • 它收集可共享的 CLI 诊断信息以及基本的主机/网络上下文。
  • 它现在捕获当前高价值信号,例如:
* openclaw status --deep * openclaw gateway probe --json * openclaw channels status --probe * 目标安全的 config get 值 * 备份试运行元数据

如何解读审计

使用 OpenClaw 自身的安全审计输出作为主要事实来源,然后将其转化为清晰的威胁叙述。

分类顺序

按此顺序确定优先级:

  1. 1. 任何开放 + 工具已启用
首先锁定私信/群组,然后收紧工具策略和沙箱。
  1. 2. 公共网络暴露
LAN 绑定、Funnel、缺少身份验证、反向代理处理薄弱。
  1. 3. 浏览器 / 节点 / 控制界面暴露
将其视为操作员访问,而非“仅仅是另一个功能

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 audit-openclaw-security-1776419949 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 audit-openclaw-security-1776419949 技能

通过命令行安装

skillhub install audit-openclaw-security-1776419949

下载

⬇ 下载 audit-openclaw-security v2.0.1(免费)

文件大小: 31.33 KB | 发布时间: 2026-4-17 20:05

v2.0.1 最新 2026-4-17 20:05
**Summary: Adds licensing and changelog files, plus compatibility and audit command updates for OpenClaw 2026.3.8**

- Added `LICENSE` (MIT) and `CHANGELOG.md` files for transparency and version tracking.
- Updated compatibility for OpenClaw 2026.3.8; referenced new agent skill guidance.
- Expanded context establishment instructions and included new recommended audit/diagnostic commands (`gateway probe`, `status --deep`, `channels status --probe`).
- Clarified interpretation of Gateway/Control UI exposure and DM/group access controls.
- Improved guidance on backups and safe config handling (use of `{baseDir}` in script paths).
- Tightened focus: no longer intended for general OS, Docker, or cloud hardening outside OpenClaw scope.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部