mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Enhance entropy (#333)
* Modified Entropy to be able to apply it on regex match or specific capture group * Config tests * Small fixes on entropy ranges * Fix toml configs Fix tests * Indents and code styles
This commit is contained in:
1 parent
e7fbcf5333
commit
ee2d73c740
20 files changed
+236
-208
No files matched your search
@@ -1,9 +1,14 @@
|
||||
[[rules]]
|
||||
description = "entropy and regex"
|
||||
regex = '''(?i)key(.{0,20})?['|"][0-9a-zA-Z]{16,45}['|"]'''
|
||||
entropies = [
|
||||
"4.5-4.7",
|
||||
"5.5-6.3",
|
||||
]
|
||||
regex = '''['|"]([0-9a-zA-Z-._{}$\/\+=]{20,120})['|"]'''
|
||||
tags = ["entropy"]
|
||||
[[rules.Entropies]]
|
||||
Min = "4.5"
|
||||
Max = "4.7"
|
||||
Group = "1"
|
||||
[[rules.Entropies]]
|
||||
Min = "5.5"
|
||||
Max = "6.3"
|
||||
Group = "1"
|
||||
|
||||
|
||||
Reference in new issue
Block a user