Find secrets with Gitleaks
open sourceMITself-hostablefree
Gitleaks detects secrets such as passwords, API keys and tokens in git history, directories, files and stdin, using configurable detection rules. It runs locally, as a pre-commit hook and in CI through its GitHub Action. Its maintainer has declared it feature complete: future releases are security patches only, and new work has moved to Betterleaks.
Ways to install
Package managers
Problems it solves
- did someone commit an API key to our repo at some point in its history
- block commits that contain passwords or tokens
- scan every pull request for leaked secrets in CI
- free secret scanning for private repos without paying per committer
- audit a repo before we make it public
Features
- git history, directory, file and stdin scanning
- configurable detection rules
- GitHub Action
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Gitleaks does.
- GitHub Secret Protection Secret scanning and push protection for private repositories, per active committer
- TruffleHog Find, verify, and analyze leaked credentials
- GitGuardian Detect and validate hardcoded secrets across your SDLC
- Kingfisher Detect secrets. Validate them live. Map blast radius. Revoke fast.
- Trivy Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
- detect-secrets An enterprise friendly way of detecting and preventing secrets in code.