From f6193bc92c5f5ea17edd64a4b1f54695903f5a69 Mon Sep 17 00:00:00 2001 From: Richard Gomez <32133502+rgmz@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:28:32 -0400 Subject: [PATCH] feat(gcp): increase rule entropy (#1840) --- cmd/generate/config/rules/gcp.go | 6 ++---- config/gitleaks.toml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/generate/config/rules/gcp.go b/cmd/generate/config/rules/gcp.go index c2dbfd6a..d6ef8a59 100644 --- a/cmd/generate/config/rules/gcp.go +++ b/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{ diff --git a/config/gitleaks.toml b/config/gitleaks.toml index dc3e8229..2f10190c 100644 --- a/config/gitleaks.toml +++ b/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 = [