Gitleaks
gitleaks/gitleaks
扫 git 仓库里误提交的密钥和令牌,适合放进提交钩子
部署命令
# MacOS
brew install gitleaks
# Docker (DockerHub)
docker pull zricethezav/gitleaks:latest
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] [OPTIONS] [SOURCE_PATH]
# Docker (ghcr.io)
docker pull ghcr.io/gitleaks/gitleaks:latest
docker run -v ${path_to_host_folder_to_scan}:/path ghcr.io/gitleaks/gitleaks:latest [COMMAND] [OPTIONS] [SOURCE_PATH]
# From Source (make sure `go` is installed)
git clone https://github.com/gitleaks/gitleaks.git
cd gitleaks
make build摘自项目 README。需要一台装了 Docker 的服务器,命令可能还需补充环境变量。
项目简介(摘自 README)
Gitleaks is a tool for detecting secrets like passwords, API keys, and tokens in git repos, files, and whatever else you wanna throw at it via stdin. If you wanna learn more about how the detection engine works check out this blog: Regex is (almost) all you need.
- 星数
- ★ 29.5k
- 语言
- Go
- 许可证
- MIT
- 最近更新
- 2026-09-23
- 分类
- 安全隐私
- 场景
- 通用工具