From 2da0c95a364339028be9004f584ae3a702463010 Mon Sep 17 00:00:00 2001 From: Baruch Odem Date: Sun, 31 Mar 2024 14:28:42 +0300 Subject: [PATCH] fix: aws-secret-key with keywords --- cmd/generate/config/rules/aws.go | 2 ++ config/gitleaks.toml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/cmd/generate/config/rules/aws.go b/cmd/generate/config/rules/aws.go index 2beb102ac..621521b96 100644 --- a/cmd/generate/config/rules/aws.go +++ b/cmd/generate/config/rules/aws.go @@ -45,6 +45,7 @@ func AWSSecretKey() *config.Rule { Description: "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms.", RuleID: "aws-secret-key", Regex: generateUniqueTokenRegex("[0-9A-Z+\\/]{40}", true), + Keywords: []string{"aws_secret_access_key", "aws_secret", "AwsSecret"}, } // validate @@ -54,6 +55,7 @@ func AWSSecretKey() *config.Rule { fps := []string{ credFileAccessKey, credFileSessionToken, + " - 4f1d13e1bbebef31175ffe9a8d752609b9edc174", } return validate(r, tps, fps) } diff --git a/config/gitleaks.toml b/config/gitleaks.toml index a3b79a285..1bbb88435 100644 --- a/config/gitleaks.toml +++ b/config/gitleaks.toml @@ -135,6 +135,9 @@ keywords = [ id = "aws-secret-key" description = "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms." regex = '''(?i)\b([0-9A-Z+\/]{40})(?:['\"\\\n\r\s\x60;<]|$)''' +keywords = [ + "aws_secret_access_key","aws_secret","awssecret", +] [[rules]] id = "beamer-api-token"