PROVIDER - Secret leak scanning for Git repositories

Gitleaks

Gitleaks scans Git history and the working tree with 150+ credential rules plus custom regex, blocking leaks before commit and offering baselines for legacy findings; pattern matching means false positives remain and rotation stays manual.

Developer Tools United States 2026.11.19
Developer Tools United States Secret leak scanning for Git repositories #open source #developer tools #CI Integration #SAST #Secret Scanning #DevSecOps
4.5pts

Service Overview

Gitleaks is an open source secret scanning tool written in Go. It walks Git commit history and the current working tree, matching API keys, private keys and database passwords against a rule catalogue and emitting structured reports.

In the development tools category it is the DevSecOps front line: rather than auditing after merges, it blocks credentials from ever entering the repository.

Key Strengths

  • Rich rules: 150+ credential formats plus custom regex
  • Pre-commit blocking: hooks stop leaks from entering history
  • Flexible usage: one binary scans local, directory or remote targets
  • Baseline mechanism: record legacy findings then clean gradually
  • Standard output: 4+ formats, with SARIF consumable by code scanning platforms

Product Ecosystem

Platform capabilities

History scanning, working tree scanning, custom rules, baseline management, ignore configuration, concurrency control and multi-format reports.

Integrations

Works with GitHub Actions, GitLab CI, pre-commit, Jenkins and code scanning platforms.

Typical scenarios

Repository security audits, CI secret gates, compliance evidence and pre-merge credential checks.

Limitations

  • False positives: high-entropy strings are easily flagged
  • Coverage limits: credentials without defined rules are missed
  • History cost: full scans of very large repositories take time
  • No revocation: leaked keys must be rotated manually

Use Cases

  • Every code repository (★★★★★): low cost with frequent payoff
  • CI secret gates (★★★★★): automatic scans before each merge
  • Compliance auditing (★★★★☆): SARIF output archives cleanly
  • Runtime secret protection (★★☆☆☆): pair with Vault-style systems

Pricing

Item Price Notes
Gitleaks itself $0 MIT open source, commercial use allowed
Binary releases $0 Direct downloads from GitHub Releases
Gitleaks Pro Contact sales Commercial edition with extra governance

FAQ

How does Gitleaks differ from GitHub native secret scanning?

Gitleaks is self-hostable, allows custom rules and runs locally at the pre-commit stage, so coverage is not limited to the GitHub platform.

How do I stop false positives blocking releases?

Record acceptable fingerprints in .gitleaksignore or a baseline file so only new findings fail.

Can it scan non-Git directories?

Yes, point it at a plain filesystem path to scan files without Git history.

What should I do after a leak is found?

Revoke and rotate the credential immediately, purge the history, then record the case in the baseline for review.

Code Examples

# .gitleaks.toml: custom rules and ignores
title = "custom gitleaks config"

[extend]
useDefault = true

[[rules]]
id = "internal-api-key"
description = "Internal API key"
regex = '''int_[0-9a-f]{32}'''

[allowlist]
paths = ['''test/fixtures/.*''']
# Scan the current repository history
gitleaks detect --source . --report-format sarif --report-path report.sarif

# Create a baseline so only new findings are reported
gitleaks detect --source . --baseline-path gitleaks-baseline.json

# Run as a pre-commit hook
gitleaks protect --staged

Community & Resources

Visit Gitleaks Website → https://gitleaks.io/
Visit Website ↗