Skip to content

Commit

Permalink
Update gitleaks.toml (#1116)
Browse files Browse the repository at this point in the history
Use Word Boundaries for EasyPost Tokens
  • Loading branch information
wolframhaussig committed Mar 14, 2023
1 parent 765bcd5 commit 1fb3a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/generate/config/rules/easypost.go
Expand Up @@ -12,7 +12,7 @@ func EasyPost() *config.Rule {
r := config.Rule{
Description: "EasyPost API token",
RuleID: "easypost-api-token",
Regex: regexp.MustCompile(`EZAK(?i)[a-z0-9]{54}`),
Regex: regexp.MustCompile(`\bEZAK(?i)[a-z0-9]{54}`),
Keywords: []string{"EZAK"},
}

Expand All @@ -28,7 +28,7 @@ func EasyPostTestAPI() *config.Rule {
r := config.Rule{
Description: "EasyPost test API token",
RuleID: "easypost-test-api-token",
Regex: regexp.MustCompile(`EZTK(?i)[a-z0-9]{54}`),
Regex: regexp.MustCompile(`\bEZTK(?i)[a-z0-9]{54}`),
Keywords: []string{"EZTK"},
}

Expand Down
4 changes: 2 additions & 2 deletions config/gitleaks.toml
Expand Up @@ -357,15 +357,15 @@ keywords = [
[[rules]]
description = "EasyPost API token"
id = "easypost-api-token"
regex = '''EZAK(?i)[a-z0-9]{54}'''
regex = '''\bEZAK(?i)[a-z0-9]{54}'''
keywords = [
"ezak",
]

[[rules]]
description = "EasyPost test API token"
id = "easypost-test-api-token"
regex = '''EZTK(?i)[a-z0-9]{54}'''
regex = '''\bEZTK(?i)[a-z0-9]{54}'''
keywords = [
"eztk",
]
Expand Down

0 comments on commit 1fb3a77

Please sign in to comment.