Gitleaks detects hardcoded secrets like passwords, API keys, and tokens in git repositories by scanning commit history and branch comparisons to identify accidentally leaked keys.
Gitleaks is an open source command line tool for detecting hardcoded secrets like passwords, API keys, and tokens in git repositories. It is used to find exposed credentials that were committed accidentally before they are exploited by outside actors.
Gitleaks scans git commit history, branches, and commit messages to detect secrets. It supports scanning of public and private git repos from GitHub, GitLab, Bitbucket, and more. The tool can scan shallow clones and single commits as well to optimize scans.
Once secrets are detected, Gitleaks logs the leaked credentials, generates a report, and can even commit fixes back to the repo to revoke the exposed secrets. It detects secrets via pattern matching, entropy checks, commit message scans, and more advanced detection mechanisms.
Gitleaks is useful for open source project maintainers, security engineers, developers, and DevOps teams to audit their own git repositories and identify exposed API keys, service credentials, SSH keys, access tokens, and other secrets before they can be abused by malicious actors.
Here are some alternatives to Gitleaks:
Suggest an alternative ❐