Define multiple allowlists per rule (#1496)

* feat: multiple rule allowlists

* feat(config): add allowlist 'condition'
This commit is contained in:
Richard Gomez authored and GitHub committed 2024-10-14 19:17:37 -05:00
1 parent 8ea608595c
commit aabe381539
26 files changed
+778 -247

No files matched your search

+9 -5
View File
@@ -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}''',
]