返回顶部
f

firm-security-audit固安审计

>

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

firm-security-audit

firm-security-audit

⚠️ AI生成内容——在生产环境进行任何修改前需经安全专家验证。

目的

此技能是任何OpenClaw网关部署或网络暴露前的强制性安全关口。它直接弥补了openclaw/openclaw仓库外部识别的关键缺口,无需修改上游代码。

覆盖的缺口:

缺口严重程度工具
C1 — SQL注入 /api/metrics/database严重openclawsecurityscan
C2 — 默认sandbox.mode: off
严重 | openclawsandboxaudit |
| C3 — 重启时重新生成会话密钥 | 高 | openclawsessionconfig_check |
| H8 — WS网关缺少速率限制 | 高 | openclawratelimit_check |
| M10 — Matrix E2EE状态未记录 | 中 | 文档检查清单 |

已激活的工具

openclawsecurityscan — SQL注入检测 (C1)
openclawsandboxaudit — 沙箱配置验证 (C2)
openclawsessionconfig_check — 会话密钥持久性检查 (C3)
openclawratelimit_check — 速率限制器验证 (H8)
firmexportslack_digest — 发现严重问题时通知团队

强制审计序列

每次部署前或激活Tailscale Funnel前执行。

步骤1 — 沙箱审计 (C2,严重优先级)

json
{
tool: openclawsandboxaudit,
args: {
config_path: /path/to/.openclaw/config.yaml
}
}

预期结果: severity: OK 且 sandbox_mode: non-main 或 all
如为严重: 在继续前应用提供的fix_snippet

步骤2 — SQL注入扫描 (C1)

json
{
tool: openclawsecurityscan,
args: {
target_path: /path/to/openclaw/src/api,
endpoint: /api/metrics/database,
scan_depth: 4
}
}

预期结果: criticalcount: 0,highcount: 0
如为严重或高: 在部署前应用remediationbyseverity

步骤3 — 会话密钥检查 (C3)

json
{
tool: openclawsessionconfig_check,
args: {
composefilepath: /path/to/docker-compose.yml,
envfilepath: /path/to/.env
}
}

预期结果: sessionsecretfound: true
如为高: 应用提供的fixdocker或fixenv

步骤4 — 速率限制检查 (H8)

json
{
tool: openclawratelimit_check,
args: {
gatewayconfigpath: /path/to/.openclaw/config.yaml,
check_funnel: true
}
}

预期结果: ratelimiterdetected: true 或 funnel_active: false
如为严重(funnel激活但无速率限制): 立即应用fixnginx或fixcaddy

步骤5 — 严重警报(自动)

如果任一审计返回severity: CRITICAL,自动通过以下方式发送:
json
{
tool: firmexportslack_digest,
args: {
objective: 安全审计 — 发现严重问题,
content: <审计结果>,
channel: #security-alerts
}
}

Matrix E2EE检查清单 (M10)

手动文档验证(无可用工具——过于仓库特定):

  • - [ ] OpenClaw的CONTRIBUTING.md是否提及Matrix E2EE状态?
  • [ ] 隐私敏感的Matrix用户是否被告知缺少E2EE?
  • [ ] 是否有ADR(firmadrgenerate)记录了Matrix E2EE决策?

快速修复模板

C2 — 沙箱修复(在config.yaml中添加)

yaml
agents:
defaults:
sandbox:
mode: non-main # ← 为非main会话启用Docker隔离
sessions:
main:
sandbox:
mode: off # main保留主机访问权限(有意为之)

C3 — 会话密钥(docker-compose.yml)

yaml
services:
openclaw:
environment:
SESSIONSECRET: ${SESSIONSECRET:?SESSION_SECRET env var required}

生成:openssl rand -base64 48 > /etc/openclaw/session.secret

H8 — Nginx速率限制

nginx
limitreqzone $binaryremoteaddr zone=openclaw:10m rate=30r/m;
server {
location /ws {
limit_req zone=openclaw burst=10 nodelay;
proxy_pass http://127.0.0.1:18789;
proxyhttpversion 1.1;
proxysetheader Upgrade $http_upgrade;
proxysetheader Connection upgrade;
}
}

升级处理

结果操作
全部正常允许部署 — 审计日志存入docs/security-audits/
沙箱或SQL严重
阻止部署 — 推送前必须修复 | | 速率限制+funnel严重 | 立即禁用Funnel并应用Nginx/Caddy修复 | | 会话密钥高 | 应用修复并重启容器,使用持久化密钥 |

CI/CD集成

在GitHub Actions工作流中添加:

yaml

  • - name: 安全审计 (firm-security-audit)

run: |
# 每次部署前从CTO或工程代理执行
openclaw skill run firm-security-audit \
--config $OPENCLAWCONFIGPATH \
--fail-on CRITICAL,HIGH


OpenClaw缺口:C1 (#29951 SQL注入),C2 (沙箱关闭),C3 (#29955 会话密钥),H8 (无速率限制)


💎 支持

如果此技能对您有帮助,您可以支持开发:

狗狗币:DQBggqFNWsRNTPb6kkiwppnMo1Hm8edfWq

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 firm-security-audit-1776288497 技能

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

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

通过命令行安装

skillhub install firm-security-audit-1776288497

下载

⬇ 下载 firm-security-audit v1.0.0(免费)

文件大小: 3.21 KB | 发布时间: 2026-4-16 18:34

v1.0.0 最新 2026-4-16 18:34
firm-security-audit 1.0.0 — Initial release.

- Provides proactive security auditing for OpenClaw deployments.
- Detects and remediates four critical/high security gaps: SQL injection, sandbox off by default, non-persistent session secret, and missing rate limiting.
- Includes step-by-step audit sequence with ready-to-use remediation templates.
- Issues automatic Slack alerts for CRITICAL findings.
- Requires manual checklist review for Matrix E2EE documentation gap.
- Designed for mandatory execution before any deployment or public exposure.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部