mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
adding access to generic rule keywords and identifiers
This commit is contained in:
1 parent
f4ddeda433
commit
1fc27eebda
2 files changed
+4
-2
No files matched your search
@@ -18,6 +18,7 @@ func GenericCredential() *config.Rule {
|
|||||||
"passwd",
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
}, `[0-9a-z\-_.=]{10,150}`),
|
}, `[0-9a-z\-_.=]{10,150}`),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
@@ -29,6 +30,7 @@ func GenericCredential() *config.Rule {
|
|||||||
"passwd",
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
},
|
},
|
||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
Allowlist: config.Allowlist{
|
Allowlist: config.Allowlist{
|
||||||
|
|||||||
@@ -1139,11 +1139,11 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Generic API Key"
|
description = "Generic API Key"
|
||||||
id = "generic-api-key"
|
id = "generic-api-key"
|
||||||
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
entropy = 3.5
|
entropy = 3.5
|
||||||
keywords = [
|
keywords = [
|
||||||
"key","api","token","secret","client","passwd","password","auth",
|
"key","api","token","secret","client","passwd","password","auth","access",
|
||||||
]
|
]
|
||||||
[rules.allowlist]
|
[rules.allowlist]
|
||||||
stopwords= [
|
stopwords= [
|
||||||
|
|||||||
Reference in new issue
Block a user