Skip to content

Commit

Permalink
Update stripe rule to not alert on publishable keys (#1320)
Browse files Browse the repository at this point in the history
* Update stripe rule to not alert on publishable keys

* run go gen

---------

Co-authored-by: Erin Browning <ebrowning@makenotion.com>
Co-authored-by: Zachary Rice <zachary.rice@trufflesec.com>
  • Loading branch information
3 people committed Jan 31, 2024
1 parent 8b8920d commit afe046b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions cmd/generate/config/rules/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ func StripeAccessToken() *config.Rule {
r := config.Rule{
Description: "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data.",
RuleID: "stripe-access-token",
Regex: generateUniqueTokenRegex(`(sk|pk)_(test|live)_[0-9a-z]{10,32}`, true),
Regex: generateUniqueTokenRegex(`(sk)_(test|live)_[0-9a-z]{10,32}`, true),
Keywords: []string{
"sk_test",
"pk_test",
"sk_live",
"pk_live",
},
}

Expand Down
4 changes: 2 additions & 2 deletions config/gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2688,9 +2688,9 @@ keywords = [
[[rules]]
id = "stripe-access-token"
description = "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data."
regex = '''(?i)\b((sk|pk)_(test|live)_[0-9a-z]{10,32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
regex = '''(?i)\b((sk)_(test|live)_[0-9a-z]{10,32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
keywords = [
"sk_test","pk_test","sk_live","pk_live",
"sk_test","sk_live",
]

[[rules]]
Expand Down

0 comments on commit afe046b

Please sign in to comment.