Skip to content

Commit

Permalink
Improve rule descriptions for Stripe and Facebook access tokens (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher committed Mar 17, 2023
1 parent 6b0c303 commit 8a31f4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/generate/config/rules/facebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func Facebook() *config.Rule {
// define rule
r := config.Rule{
Description: "Facebook",
Description: "Facebook Access Token",
RuleID: "facebook",
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
SecretGroup: 1,
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/config/rules/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func StripeAccessToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Stripe",
Description: "Stripe Access Token",
RuleID: "stripe-access-token",
Regex: regexp.MustCompile(`(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}`),
Keywords: []string{
Expand Down
4 changes: 2 additions & 2 deletions config/gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ keywords = [
]

[[rules]]
description = "Facebook"
description = "Facebook Access Token"
id = "facebook"
regex = '''(?i)(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
Expand Down Expand Up @@ -2624,7 +2624,7 @@ keywords = [
]

[[rules]]
description = "Stripe"
description = "Stripe Access Token"
id = "stripe-access-token"
regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}'''
keywords = [
Expand Down

0 comments on commit 8a31f4a

Please sign in to comment.