Shannon entropy
A measure, in bits per character, of how unpredictable a string is, used to tell random-looking tokens from ordinary text.
In more detail
Random tokens score high and English words low, but UUIDs and hashes score high too. That is why a secret rule needs a pattern for the token format as well as an entropy floor such as 3.5.
Related terms
- Gitleaks — An open-source secret scanner for Git repositories and files, configured with TOML rules that combine regular expressions, keywords and entropy.
- secret scanning — Searching code, commits and files for credentials such as keys and tokens, ideally before they are committed.
- UUID — A 128-bit identifier, usually written as 32 hexadecimal digits in five groups, designed to be unique without any central coordination.
Taught in
- Pre-Commit Secret Scanning with Gitleaks & Entropy — Cloud Security & DevSecOps Engineering