OpenClaw Security Guard
A comprehensive security tool for OpenClaw users to protect their AI assistant.
Features
- - 🔍 Security Audit - Comprehensive security configuration check
- 🔐 Secret Scanner - Detect exposed API keys and tokens
- 👥 Access Control - Manage devices, users, and permissions
- 🔑 Token Manager - Rotate and validate tokens
- 📊 Security Report - Generate detailed security reports
- 🛡️ Hardening - Apply security best practices
Requirements
- - Python 3.6+
- No external dependencies (uses stdlib)
Commands
CODEBLOCK0
Options
CODEBLOCK1
Security Checks
| Category | Checks |
|---|
| Config | Gateway bind, auth mode, token strength |
| Secrets |
API keys, tokens, passwords, private keys |
| Access | Devices, users, channels, sessions |
| Network | Public exposure, open ports |
Examples
CODEBLOCK2
Output Formats
Table (default)
CODEBLOCK3
JSON
CODEBLOCK4
Markdown
CODEBLOCK5
Languages
Auto-detected based on system locale.
License
MIT
Version
v1.0.0
OpenClaw 安全卫士
为OpenClaw用户提供全面的AI助手安全保护工具。
功能特性
- - 🔍 安全审计 - 全面的安全配置检查
- 🔐 密钥扫描器 - 检测暴露的API密钥和令牌
- 👥 访问控制 - 管理设备、用户和权限
- 🔑 令牌管理器 - 轮换和验证令牌
- 📊 安全报告 - 生成详细的安全报告
- 🛡️ 安全加固 - 应用安全最佳实践
系统要求
- - Python 3.6+
- 无外部依赖(使用标准库)
命令
bash
运行安全审计
python3 {baseDir}/scripts/main.py audit
扫描密钥
python3 {baseDir}/scripts/main.py scan
生成报告
python3 {baseDir}/scripts/main.py report --format md
检查令牌状态
python3 {baseDir}/scripts/main.py token status
访问控制
python3 {baseDir}/scripts/main.py access list
安全加固
python3 {baseDir}/scripts/main.py harden --fix
快速状态检查
python3 {baseDir}/scripts/main.py status
选项
--format, -f 输出格式:json, md, table(默认:table)
--lang, -l 语言:en, zh(默认:自动检测)
--quiet, -q 静默模式,仅输出结果
--verbose, -v 详细输出
--output, -o 输出文件路径
--deep 深度扫描模式
--fix 自动修复可解决的问题
安全检查项
API密钥、令牌、密码、私钥 |
| 访问 | 设备、用户、频道、会话 |
| 网络 | 公网暴露、开放端口 |
示例
bash
带自动修复的全面审计
python3 {baseDir}/scripts/main.py audit --deep --fix
生成Markdown报告
python3 {baseDir}/scripts/main.py report --format md -o security.md
扫描特定模式
python3 {baseDir}/scripts/main.py scan --pattern sk-
列出所有已配对设备
python3 {baseDir}/scripts/main.py access devices
生成JSON报告
python3 {baseDir}/scripts/main.py report --format json
输出格式
表格(默认)
🔐 OpenClaw 安全卫士 v1.0.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 安全评分:72/100 ⚠️
🔴 高风险
• 配置文件中暴露了API密钥
位置:~/.openclaw/openclaw.json:15
JSON
json
{
score: 72,
findings: [...]
}
Markdown
markdown
安全报告
评分:72/100
语言支持
根据系统区域设置自动检测。
许可证
MIT
版本
v1.0.0