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
+2
-2
@@ -104,14 +104,14 @@
|
||||
"id": "slack",
|
||||
"name": "Slack",
|
||||
"shortDescription": {
|
||||
"text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
|
||||
"text": "xox[baprs]-(?:[0-9a-zA-Z]{10,48})?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "apkey",
|
||||
"name": "Asymmetric Private Key",
|
||||
"shortDescription": {
|
||||
"text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
|
||||
"text": "-----BEGIN (?:(?:EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY(?: BLOCK)?-----"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user