Install
openclaw skills install @g620710/ai-agent-security-scannerAI Agent安全审计工具。扫描Skill/Agent代码中的敏感信息泄露、API密钥暴露、注入风险、权限问题、数据安全漏洞,AI智能分析给出修复建议。适用于开发者发布前安全自检、代码安全review。
openclaw skills install @g620710/ai-agent-security-scannerAI Agent和Skill代码安全审计利器,一键扫描安全漏洞,AI智能分析给出可落地的修复方案。帮你在发布前堵住安全漏洞,避免密钥泄露、注入攻击、数据泄露等风险。
# 扫描单个文件
python3 {baseDir}/scripts/audit.py path/to/your/skill.py
# 扫描整个Skill目录
python3 {baseDir}/scripts/audit.py path/to/skill/directory
# 只看严重和高危问题
python3 {baseDir}/scripts/audit.py ./ --severity high
# 输出JSON格式报告
python3 {baseDir}/scripts/audit.py ./ --format json -o report.json
# 跳过AI分析(快速扫描)
python3 {baseDir}/scripts/audit.py ./ --no-ai
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| target | string | 是 | 要扫描的文件或目录路径 |
| --no-ai | flag | 否 | 跳过AI深度分析,只做静态扫描 |
| --format | string | 否 | 输出格式:text/json,默认text |
| -o, --output | string | 否 | 输出报告文件路径 |
| --severity | string | 否 | 过滤级别:critical/high/medium/low/all,默认all |
| --api-key | string | 否 | DeepSeek API Key,也可通过环境变量设置 |
| --base-url | string | 否 | DeepSeek API Base URL |
扫描报告包含:
# 在CI流水线中使用,发现严重问题时失败退出
python3 {baseDir}/scripts/audit.py ./src --severity critical
if [ $? -ne 0 ]; then
echo "❌ 发现严重安全问题,构建终止!"
exit 1
fi
# 生成每日安全报告
python3 {baseDir}/scripts/audit.py /path/to/project -o reports/audit_$(date +%Y%m%d).json
for skill in ./skills/*/; do
name=$(basename "$skill")
echo "扫描: $name"
python3 {baseDir}/scripts/audit.py "$skill" --no-ai -o "reports/${name}_audit.txt"
done
需要配置DeepSeek API密钥(用于AI深度分析):
DEEPSEEK_API_KEYDEEPSEEK_BASE_URL(自定义API地址)静态扫描无需API Key,只有AI深度分析需要。
references/owasp_top10.md - OWASP Top 10安全风险references/security_checklist.md - AI Agent安全检查清单references/fix_examples.md - 常见漏洞修复示例代码