mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 05:24:22 +01:00
1 parent
d8cd93cabe
commit
3474c58c9e
58 files changed
+264
-337
No files matched your search
@@ -3,6 +3,7 @@ package rules
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
@@ -11,13 +12,13 @@ func Clojars() *config.Rule {
|
||||
r := config.Rule{
|
||||
Description: "Clojars API token",
|
||||
RuleID: "clojars-api-token",
|
||||
Regex: regexp.MustCompile(`(CLOJARS_)(?i)[a-z0-9]{60}`),
|
||||
Regex: regexp.MustCompile(`(?i)(CLOJARS_)[a-z0-9]{60}`),
|
||||
Keywords: []string{"clojars"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"clojarsAPIToken := \"CLOJARS_" + sampleAlphaNumeric60Token + "\"",
|
||||
generateSampleSecret("clojars", "CLOJARS_"+secrets.NewSecret(alphaNumeric("60"))),
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
Reference in new issue
Block a user