Просмотр исходного кода

feat(gcp): increase rule entropy (#1840)

Richard Gomez 9 месяцев назад
Родитель
Сommit
f6193bc92c
2 измененных файлов с 3 добавлено и 5 удалено
  1. 2 4
      cmd/generate/config/rules/gcp.go
  2. 1 1
      config/gitleaks.toml

+ 2 - 4
cmd/generate/config/rules/gcp.go

@@ -30,10 +30,8 @@ func GCPAPIKey() *config.Rule {
 		RuleID:      "gcp-api-key",
 		Description: "Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches.",
 		Regex:       utils.GenerateUniqueTokenRegex(`AIza[\w-]{35}`, false),
-		Entropy:     3.0,
-		Keywords: []string{
-			"AIza",
-		},
+		Entropy:     4,
+		Keywords:    []string{"AIza"},
 		Allowlists: []*config.Allowlist{
 			{
 				Regexes: []*regexp.Regexp{

+ 1 - 1
config/gitleaks.toml

@@ -552,7 +552,7 @@ keywords = ["freshbooks"]
 id = "gcp-api-key"
 description = "Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches."
 regex = '''\b(AIza[\w-]{35})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
+entropy = 4
 keywords = ["aiza"]
 [[rules.allowlists]]
 regexes = [