gitleaks Command Examples

Detect secrets and API keys leaked in Git repositories. More information: https://github.com/gitleaks/gitleaks.

gitleaks detect --repo-url {{https://github.com/username/repository.git}}

gitleaks detect --source {{path/to/repository}}

gitleaks detect --source {{path/to/repository}} --report {{path/to/report.json}}

gitleaks detect --source {{path/to/repository}} --config-path {{path/to/config.toml}}

gitleaks detect --source {{path/to/repository}} --log-opts {{--since=commit_id}}

gitleaks protect --staged

gitleaks protect --staged --verbose