Gitleaks
An open-source secret scanner for Git repositories and files, configured with TOML rules that combine regular expressions, keywords and entropy.
In more detail
A custom rule gives an ID, a regex with a capture group for the secret, keyword prefilters and a minimum entropy. --redact keeps found secrets out of the build log, and .gitleaksignore silences one finding by fingerprint.
Related terms
- secret scanning — Searching code, commits and files for credentials such as keys and tokens, ideally before they are committed.
- .gitleaksignore — A file listing the fingerprints of Gitleaks findings to ignore, each identifying one secret in one file at one commit.
- TOML — A plain text configuration file format of sections and key = value lines, designed to be easy for people to read.
- Shannon entropy — A measure, in bits per character, of how unpredictable a string is, used to tell random-looking tokens from ordinary text.
Taught in
- Shift-Left Security Principles & Automated Pipeline Gates — Cloud Security & DevSecOps Engineering
- Pre-Commit Secret Scanning with Gitleaks & Entropy — Cloud Security & DevSecOps Engineering