mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
bugfix: reduce false positives for stripe tokens by using word boundaries in regex (#1278)
This commit is contained in:
1 parent
6d0d8b5068
commit
bd9a25a379
2 files changed
+4
-5
No files matched your search
@@ -2777,7 +2777,7 @@ keywords = [
|
||||
[[rules]]
|
||||
id = "stripe-access-token"
|
||||
description = "Stripe Access Token"
|
||||
regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}'''
|
||||
regex = '''(?i)\b((sk|pk)_(test|live)_[0-9a-z]{10,32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||
keywords = [
|
||||
"sk_test","pk_test","sk_live","pk_live",
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user