mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
cleaner and bounded regex for generic keys and secrets
This commit is contained in:
1 parent
6d980b4eab
commit
f47e1f71ee
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -93,12 +93,12 @@ tags = ["key", "EC"]
|
||||
|
||||
[[rules]]
|
||||
description = "Generic API key"
|
||||
regex = '''[a|A][p|P][i|I][_]?[k|K][e|E][y|Y].*['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
regex = '''(?i)api_key(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
tags = ["key", "API", "generic"]
|
||||
|
||||
[[rules]]
|
||||
description = "Generic Secret"
|
||||
regex = '''[s|S][e|E][c|C][r|R][e|E][t|T].*['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
regex = '''(?i)secret(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
tags = ["key", "Secret", "generic"]
|
||||
|
||||
[[rules]]
|
||||
|
||||
+2
-2
@@ -109,12 +109,12 @@ tags = ["key", "EC"]
|
||||
|
||||
[[rules]]
|
||||
description = "Generic API key"
|
||||
regex = '''[a|A][p|P][i|I][_]?[k|K][e|E][y|Y].*['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
regex = '''(?i)api_key(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
tags = ["key", "API", "generic"]
|
||||
|
||||
[[rules]]
|
||||
description = "Generic Secret"
|
||||
regex = '''[s|S][e|E][c|C][r|R][e|E][t|T].*['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
regex = '''(?i)secret(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
|
||||
tags = ["key", "Secret", "generic"]
|
||||
|
||||
[[rules]]
|
||||
|
||||
Reference in new issue
Block a user