Skip to content

Commit

Permalink
re-ad keys, it's better they get picked up as stripe keys than generi…
Browse files Browse the repository at this point in the history
…c keys
  • Loading branch information
willem-delbare committed May 9, 2024
1 parent 6a73307 commit b2ddbbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/generate/config/rules/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ 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|rk)_(test|live|prod)_[0-9a-z]{10,99}`, true),
Regex: generateUniqueTokenRegex(`(sk|pk|rk)_(test|live|prod)_[0-9a-z]{10,99}`, true),
Keywords: []string{
"sk_test",
"pk_test",
"sk_live",
"pk_live",
"sk_prod",
"rk_test",
"rk_live",
Expand Down
4 changes: 2 additions & 2 deletions config/gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2697,9 +2697,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|rk)_(test|live|prod)_[0-9a-z]{10,99})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
regex = '''(?i)\b((sk|pk|rk)_(test|live|prod)_[0-9a-z]{10,99})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
keywords = [
"sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod",
"sk_test","pk_test","sk_live","pk_live","sk_prod","rk_test","rk_live","rk_prod",
]

[[rules]]
Expand Down

0 comments on commit b2ddbbb

Please sign in to comment.