updating generic regex and algoia regex (#875)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-05-25 08:00:10 -05:00
1 parent 93e72c215d
commit 469cd22f61
3 files changed
+6 -7

No files matched your search

+3 -3
View File
@@ -45,7 +45,7 @@ keywords = [
[[rules]]
description = "Algolia API Key"
id = "algolia-api-key"
regex = '''\b((?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
regex = '''(?i)(?:algolia)(?:[0-9a-z\-_\s.]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
keywords = [
"algolia",
]
@@ -741,11 +741,11 @@ keywords = [
[[rules]]
description = "Generic API Key"
id = "generic-api-key"
regex = '''(?i)(?:key|api[^Version]|token|pat|secret|client|password|auth)(?:[0-9a-z\-_\s.]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60]|$)'''
regex = '''(?i)(?:key|api[^Version]|token|secret|client|passwd|password|auth)(?:[0-9a-z\-_\s.]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60]|$)'''
secretGroup = 1
entropy = 3.5
keywords = [
"key","api","token","secret","client","pat","password","auth",
"key","api","token","secret","client","passwd","password","auth",
]
[rules.allowlist]
stopwords= [