mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Define multiple allowlists per rule (#1496)
* feat: multiple rule allowlists * feat(config): add allowlist 'condition'
This commit is contained in:
1 parent
8ea608595c
commit
aabe381539
26 files changed
+778
-247
No files matched your search
@@ -481,7 +481,7 @@ keywords = [
|
||||
"access",
|
||||
]
|
||||
|
||||
[rules.allowlist]
|
||||
[[rules.allowlists]]
|
||||
stopwords = [
|
||||
"000000",
|
||||
"aaaaaa",
|
||||
@@ -2169,7 +2169,7 @@ regex = '''(?i)(?:\bkind:[ \t]*["']?secret["']?(?:.|\s){0,200}?\bdata:(?:.|\s){0
|
||||
path = '''(?i)\.ya?ml$'''
|
||||
keywords = ["secret"]
|
||||
|
||||
[rules.allowlist]
|
||||
[[rules.allowlists]]
|
||||
regexes = [
|
||||
'''[\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:\{\{[ \t\w"|$:=,.-]+}}|""|'')''',
|
||||
]
|
||||
@@ -2355,7 +2355,7 @@ path = '''(?i)nuget\.config$'''
|
||||
entropy = 1
|
||||
keywords = ["<add key="]
|
||||
|
||||
[rules.allowlist]
|
||||
[[rules.allowlists]]
|
||||
regexes = [
|
||||
'''33f!!lloppa''',
|
||||
'''hal\+9ooo_da!sY''',
|
||||
@@ -2685,11 +2685,15 @@ regex = '''(?i:(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3})(?:=|>|:{
|
||||
entropy = 3
|
||||
keywords = ["sumo"]
|
||||
|
||||
[rules.allowlist]
|
||||
[[rules.allowlists]]
|
||||
regexTarget = "line"
|
||||
regexes = [
|
||||
'''sumOf''',
|
||||
]
|
||||
[[rules.allowlists]]
|
||||
paths = [
|
||||
'''tests/.+$''',
|
||||
]
|
||||
|
||||
[[rules]]
|
||||
id = "sumologic-access-token"
|
||||
@@ -2774,7 +2778,7 @@ keywords = [
|
||||
"s.",
|
||||
]
|
||||
|
||||
[rules.allowlist]
|
||||
[[rules.allowlists]]
|
||||
regexes = [
|
||||
'''s\.[A-Za-z]{24}''',
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user