Trivy vs Gitleaks: open-source security testing tools compared
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
Summary
Trivy: Security scanner for container images, filesystems, Git repositories, VM images and Kubernetes, covering CVEs, misconfigurations, secrets and licenses.
Gitleaks: CLI that detects secrets such as passwords, API keys and tokens in git repositories, files and stdin.
Both are listed under Security testing. The table gives repository metrics from the GitHub API with their fetch date, then the documented facts used for every comparison in this category, each linked to the README or docs page it comes from. A cell reads "not documented" when the fact was not found in the project's documentation; that does not mean the feature is absent.
Side by side
| Fact | Trivy | Gitleaks |
|---|---|---|
| Stars | 38,0091 | 29,4281 |
| Forks | 7071 | 2,2381 |
| Contributors | 5511 | 2341 |
| Last release | 2026-08-141 | 2026-03-211 |
| Last commit | 2026-09-221 | 2026-07-221 |
| Commits in 90 days | 1181 | 51 |
| License | Apache-2.01 | MIT1 |
| Primary language | Go1 | Go1 |
| Status | active1 | active1 |
| Scan targets | Container images, filesystems, remote Git repositories, virtual machine images, Kubernetes source: README | Secrets such as passwords, API keys and tokens in git repositories, files and stdin source: README |
| Languages or files analysed | OS packages, language-specific packages, IaC files, Kubernetes clusters source: Docs: Scanning Coverage | Git commit patches (via git log -p), directories and files source: README |
| Check or rule format | Custom misconfiguration checks written in Rego source: Docs: Custom Checks | TOML config file with [[rules]] entries using Go regular expressions source: README |
| CI integration | GitHub Action aquasecurity/trivy-action; community CircleCI orb, Buildkite plugin and GitLab templates source: Docs: CI/CD Integrations | GitHub Action (Gitleaks-Action); pre-commit hook source: README |
| Report formats | Table, JSON, SARIF, template, SBOM, GitHub dependency snapshot source: Docs: Reporting | JSON, CSV, JUnit, SARIF, custom template source: README |
| Install method | Homebrew (brew install trivy); Docker image aquasec/trivy; release binaries source: README | Homebrew (brew install gitleaks); Docker images zricethezav/gitleaks and ghcr.io/gitleaks/gitleaks; Go source build; release binaries source: README |
1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.
When each fits
Written from each project's documented scope, not from preference. Neither tool is ranked.
Trivy
Fits projects that scan container images, filesystems, Git repositories, VM images or Kubernetes for security issues; its README describes scanners for CVEs, IaC misconfigurations, secrets and software licenses. source: README
Gitleaks
Fits projects that check git repositories and files for committed secrets; its README describes three scanning modes: git, dir and stdin. source: README
More on these tools
Sources
- GitHub REST API: repository, read
- GitHub REST API: repository, read
- GitHub REST API: contributors, read
- GitHub REST API: contributors, read
- GitHub REST API: latest release, read
- GitHub REST API: latest release, read
- GitHub REST API: commits, read
- GitHub REST API: commits, read
- README, read
- README, read
- Docs: Scanning Coverage, read
- Docs: Custom Checks, read
- Docs: CI/CD Integrations, read
- Docs: Reporting, read
Documented facts collected 2026-09-22. See the methodology for how metrics and facts are gathered.