返回顶部
c

clawdbot-self-security-auditClawdbot安全审计

Perform a comprehensive read-only security audit of Clawdbot's own configuration. This is a knowledge-based skill that teaches Clawdbot to identify hardening opportunities across the system. Use when user asks to "run security check", "audit clawdbot", "check security hardening", or "what vulnerabilities does my Clawdbot have". This skill uses Clawdbot's internal capabilities and file system access to inspect configuration, detect misconfigurations, and recommend remediations. It is designed to

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

clawdbot-self-security-audit

Clawdbot 自我安全审计框架

该技能使 Clawdbot 能够使用第一性原理推理来审计自身的安全态势。Clawdbot 不是依赖静态脚本,而是学习该框架并动态应用它来检测漏洞、理解其影响并推荐具体的修复措施。

核心理念

通过透明和自我意识实现安全。 — 灵感来自 ᴅᴀɴɪᴇʟ ᴍɪᴇssʟᴇʀ

Clawdbot 应该了解自身的攻击面。该技能直接嵌入了这种知识。

安全原则

运行具有 shell 访问权限的 AI 代理需要谨慎。重点关注三个领域:

  1. 1. 谁可以与机器人对话 — 私信策略、群组白名单、频道限制
  2. 允许机器人在哪里操作 — 网络暴露、网关绑定、代理配置
  3. 机器人可以接触什么 — 工具访问、文件权限、凭据存储

从最小的访问权限开始,随着信心的增强再逐步扩大。

信任层级

根据角色应用适当的信任级别:

级别实体信任模型
1所有者完全信任 — 拥有所有访问权限
2
AI | 信任但验证 — 沙盒化、记录日志 |
| 3 | 白名单 | 有限信任 — 仅限指定用户 |
| 4 | 陌生人 | 不信任 — 默认阻止 |

审计命令

使用这些命令来运行安全审计:

  • - clawdbot security audit — 常见问题的标准审计
  • clawdbot security audit --deep — 包含所有检查的全面审计
  • clawdbot security audit --fix — 应用护栏修复措施

12 个安全域

审计 Clawdbot 时,系统性地评估这些域:

1. 网关暴露 🔴 严重

检查内容:

  • - 网关绑定在哪里?(gateway.bind)
  • 是否配置了身份验证?(gateway.authtoken 或 CLAWDBOTGATEWAY_TOKEN 环境变量)
  • 暴露了哪个端口?(默认:18789)
  • 是否启用了 WebSocket 身份验证?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -A10 gateway
env | grep CLAWDBOTGATEWAYTOKEN

漏洞: 绑定到 0.0.0.0 或 lan 且未启用身份验证,允许网络访问。

修复措施:
bash

生成网关令牌


clawdbot doctor --generate-gateway-token
export CLAWDBOTGATEWAYTOKEN=$(openssl rand -hex 32)


2. 私信策略配置 🟠 高

检查内容:

  • - dm_policy 设置为什么?
  • 如果是 allowlist,通过 allowFrom 明确允许了谁?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -E dm_policy|allowFrom

漏洞: 设置为 allow 或 open 意味着任何用户都可以向 Clawdbot 发送私信。

修复措施:
json
{
channels: {
telegram: {
dmPolicy: allowlist,
allowFrom: [@trusteduser1, @trusteduser2]
}
}
}



3. 群组访问控制 🟠 高

检查内容:

  • - groupPolicy 设置为什么?
  • 群组是否明确列入白名单?
  • 是否配置了提及门控?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -E groupPolicy|groups
cat ~/.clawdbot/clawdbot.json | grep -i mention

漏洞: 开放的群组策略允许房间内的任何人触发命令。

修复措施:
json
{
channels: {
telegram: {
groupPolicy: allowlist,
groups: {
-100123456789: true
}
}
}
}



4. 凭据安全 🔴 严重

检查内容:

  • - 凭据文件位置和权限
  • 环境变量使用情况
  • 身份验证配置文件存储

凭据存储映射:

平台路径
WhatsApp~/.clawdbot/credentials/whatsapp/{accountId}/creds.json
Telegram
~/.clawdbot/clawdbot.json 或环境变量 |
| Discord | ~/.clawdbot/clawdbot.json 或环境变量 |
| Slack | ~/.clawdbot/clawdbot.json 或环境变量 |
| 配对白名单 | ~/.clawdbot/credentials/channel-allowFrom.json |
| 身份验证配置文件 | ~/.clawdbot/agents/{agentId}/auth-profiles.json |
| 旧版 OAuth | ~/.clawdbot/credentials/oauth.json |

检测方法:
bash
ls -la ~/.clawdbot/credentials/
ls -la ~/.clawdbot/agents/*/auth-profiles.json 2>/dev/null
stat -c %a ~/.clawdbot/credentials/oauth.json 2>/dev/null

漏洞: 权限宽松的明文凭据可被任何进程读取。

修复措施:
bash
chmod 700 ~/.clawdbot
chmod 600 ~/.clawdbot/credentials/oauth.json
chmod 600 ~/.clawdbot/clawdbot.json



5. 浏览器控制暴露 🟠 高

检查内容:

  • - 是否启用了浏览器控制?
  • 是否为远程控制设置了身份验证令牌?
  • 控制 UI 是否需要 HTTPS?
  • 是否配置了专用浏览器配置文件?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -A5 browser
cat ~/.clawdbot/clawdbot.json | grep -i controlUi|insecureAuth
ls -la ~/.clawdbot/browser/

漏洞: 未启用身份验证的浏览器控制暴露允许远程 UI 接管。浏览器访问允许模型使用已登录的会话。

修复措施:
json
{
browser: {
remoteControlUrl: https://...,
remoteControlToken: ...,
dedicatedProfile: true,
disableHostControl: true
},
gateway: {
controlUi: {
allowInsecureAuth: false
}
}
}

安全说明: 将浏览器控制 URL 视为管理员 API。



6. 网关绑定与网络暴露 🟠 高

检查内容:

  • - gateway.bind 设置为什么?
  • 是否配置了受信任的代理?
  • 是否启用了 Tailscale?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -A10 gateway
cat ~/.clawdbot/clawdbot.json | grep tailscale

漏洞: 未启用身份验证的公共绑定允许互联网访问网关。

修复措施:
json
{
gateway: {
bind: 127.0.0.1,
mode: local,
trustedProxies: [127.0.0.1, 10.0.0.0/8],
tailscale: {
mode: off
}
}
}



7. 工具访问与沙盒化 🟡 中

检查内容:

  • - 是否将提权工具列入白名单?
  • 是否配置了 restricttools 或 mcptools?
  • workspaceAccess 设置为什么?
  • 敏感工具是否在沙盒中运行?

检测方法:
bash
cat ~/.clawdbot/clawdbot.json | grep -i restrict|mcp|elevated
cat ~/.clawdbot/clawdbot.json | grep -i workspaceAccess|sandbox
cat ~/.clawdbot/clawdbot.json | grep -i openRoom

工作区访问级别:

模式描述
none工作区禁止访问
ro
工作区以只读方式挂载 |
| rw | 工作区以读写方式挂载 |

漏洞: 广泛的工具访问意味着如果被攻破,爆炸半径更大。较小的模型更容易受到工具滥用的影响。

修复措施

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawdbot-security-check-1776382999 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawdbot-security-check-1776382999 技能

通过命令行安装

skillhub install clawdbot-security-check-1776382999

下载

⬇ 下载 clawdbot-self-security-audit v2.2.2(免费)

文件大小: 10.58 KB | 发布时间: 2026-4-17 15:07

v2.2.2 最新 2026-4-17 15:07
Added Trust Hierarchy, Prompt Injection Mitigation, Sandboxing levels, Browser Control Risks, Incident Response, Secret Scanning, Vulnerability Reporting. 13 domains.

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

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

p2p_official_large
返回顶部