mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 21:44:23 +01:00
More rule fixes (#1586)
* feat: tweak more rules * fix(curl): update pattern & ignore more stuff * chore: update .gitleaksignore
This commit is contained in:
1 parent
5407c44e0c
commit
455ae0aab7
47 files changed
+531
-374
No files matched your search
@@ -12,14 +12,13 @@ func GrafanaApiKey() *config.Rule {
|
||||
RuleID: "grafana-api-key",
|
||||
Description: "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics.",
|
||||
Regex: utils.GenerateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,3}`, true),
|
||||
Entropy: 3,
|
||||
Keywords: []string{"eyJrIjoi"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
utils.GenerateSampleSecret("grafana-api-key",
|
||||
"eyJrIjoi"+
|
||||
secrets.NewSecret(utils.AlphaNumeric("70"))),
|
||||
utils.GenerateSampleSecret("grafana-api-key", "eyJrIjoi"+secrets.NewSecret(utils.AlphaNumeric("70"))),
|
||||
}
|
||||
return utils.Validate(r, tps, nil)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user