mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Limit newlines regex (#881)
* improve regex to reduce fps with newlines * remove version from regex and rely on stopwords instead * add false positive for validation
This commit is contained in:
1 parent
0eb57cbe4d
commit
82e409a434
3 files changed
+48
-45
No files matched your search
@@ -16,7 +16,7 @@ const (
|
||||
|
||||
// identifier prefix (just an ignore group)
|
||||
identifierPrefix = `(?:`
|
||||
identifierSuffix = `)(?:[0-9a-z\-_\s.]{0,20})(?:[\s|']|[\s|"]){0,3}`
|
||||
identifierSuffix = `)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}`
|
||||
|
||||
// commonly used assignment operators or function call
|
||||
operator = `(?:=|>|:=|\|\|:|<=|=>|:)`
|
||||
|
||||
Reference in new issue
Block a user