Skip to content
THREATWIRE

Gitleaks

Secret scanner for Git repositories and files

Fast secret scanner for Git history, directories and stdin, with regex and entropy rules for API keys, tokens and passwords.

Open sourceMIT
Alternative toGitGuardian
Homepage of Gitleaks
Official website (gitleaks.io), captured by ThreatWire.

What Gitleaks does

Gitleaks scans Git repositories (including their full history), plain directories or piped input for secrets. Its default configuration covers a long list of credential formats, and custom rules can be added in TOML.

It is commonly installed as a pre-commit hook and as a CI step to stop new secrets from reaching a repository, with baseline and allow-list options to manage existing findings.

Key features

  • Scans Git history, directories and stdin
  • Large default rule set plus custom TOML rules
  • Pre-commit hook and GitHub Action
  • Baselines and allow-lists
  • JSON, CSV, SARIF and JUnit reports

Licence

MIT · MIT License · Open source

Checked by ThreatWire against the repository's licence file on 2026-10-20. GitHub detects: MIT.

Security of Gitleaks itself

No published advisory found for Gitleaks in GitHub repository advisories and OSV.dev. That does not mean the tool has no vulnerabilities.

Sources: GitHub repository advisories, OSV.dev · checked 2026-10-20.

Categories and tags

Secrets detection#secrets#git#pre-commit#go#security#security-tools#golang#secret

Related tools

  • TruffleHog

    Find, verify and analyse leaked credentials

    Secret scanner with hundreds of credential detectors that can verify whether a found key is live, across Git, cloud storage, chat and more.

    Stars
    29k
    Forks
    2.7k
    Last commit
    today
    AGPL-3.0-onlyOpen sourceSecrets detection
    Alternative toGitGuardian
  • Trivy

    All-in-one scanner for images, code, IaC and clusters

    Scanner from Aqua Security that finds vulnerabilities, misconfigurations, secrets and licences in container images, file systems, repositories and Kubernetes.

    Stars
    39k
    Forks
    776
    Last commit
    today
    Alternative toSnykPrisma Cloud+1
  • Infisical

    Secrets, certificates and access management platform

    Open-core platform to manage application secrets and environment variables across teams and infrastructure, with SDKs, a CLI and secret scanning.

    Stars
    30k
    Forks
    2.4k
    Last commit
    today
    Alternative toHashiCorp Vault
  • Checkov

    Static analysis for infrastructure as code

    Policy-as-code scanner for Terraform, CloudFormation, Kubernetes, Helm, Dockerfiles and more, with graph-based checks across resources.

    Stars
    9.1k
    Forks
    1.4k
    Last commit
    6 days ago
    Apache-2.0Open sourceCloud and IaC security
    Alternative toPrisma CloudWiz+1
Share on X@threatwire_https://www.threatwire.tech/tools/gitleaks