mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
Add support for reportGroup (#456)
Why: * There are times where it would be nice to have a group from the regex reported rather than the complete match. This change addresses the need by: * Add the reportGroup configuration option for a rule. * Update scan.CheckRules to return the reportGroup if set. Co-authored-by: Daniel Paul Searles <dsearles@gitlab.com>
This commit is contained in:
1 parent
ede68fd95d
commit
2acc34dfdf
6 files changed
+158
No files matched your search
@@ -0,0 +1,10 @@
|
||||
[[rules]]
|
||||
description = "AWS Secret Key"
|
||||
regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
|
||||
tags = ["key", "AWS"]
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Manager ID"
|
||||
regex = '''AWS secret: ("?)((A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16})("?)'''
|
||||
tags = ["key", "AWS"]
|
||||
reportGroup = 2
|
||||
Reference in new issue
Block a user