devops
Secret Scanner
扫描代码仓库中的敏感信息泄露:API Key、密码、证书私钥。
Secret Scanner
扫描 Git 仓库和文件系统,检测意外提交的敏感信息:API Key、密码、Token、私钥。
clawhub install secret-scanner
核心功能
- 全历史扫描:不只扫描当前代码,还扫描 Git 历史中的泄露
- 60+ 规则:覆盖 AWS、GCP、Azure、Stripe、GitHub、Slack 等主流服务
- 熵值检测:高熵字符串自动标记为可疑密钥
- 自动修复:检测到泄露后自动建议 git filter-branch 清除
- CI/CD 集成:作为 pre-commit hook 或 CI 步骤运行
扫描结果示例
🔴 CRITICAL src/config.py:12 AWS Secret Access Key
🟡 WARNING .env.local:3 Database Password
🟡 WARNING history:abc123 Stripe API Key (deleted but in git history)
建议操作:
1. 轮换所有已泄露的密钥
2. git filter-branch 清除历史中的密钥
3. 添加 .gitignore 规则
版本
v1.0.0
作者
AgentSkill Hub
平台
openclaw
发布时间
2026年4月25日