mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Use first non-empty group if secretGroup isn't set (#1459)
* feat(detect): secret is first non-empty group * test: fix errors - update capture groups - update expected data
This commit is contained in:
1 parent
b4009bfba4
commit
d3c4b9078e
4 files changed
+30
-23
No files matched your search
Vendored
+2
-2
@@ -79,13 +79,13 @@ title = "gitleaks config"
|
||||
[[rules]]
|
||||
id = "slack"
|
||||
description = "Slack"
|
||||
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
||||
regex = '''xox[baprs]-(?:[0-9a-zA-Z]{10,48})?'''
|
||||
tags = ["key", "Slack"]
|
||||
|
||||
[[rules]]
|
||||
id = "apkey"
|
||||
description = "Asymmetric Private Key"
|
||||
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
|
||||
regex = '''-----BEGIN (?:(?:EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY(?: BLOCK)?-----'''
|
||||
tags = ["key", "AsymmetricPrivateKey"]
|
||||
|
||||
[[rules]]
|
||||
|
||||
Reference in new issue
Block a user