diff --git a/config/gitleaks.toml b/config/gitleaks.toml index ae159ef3..cfd9a331 100644 --- a/config/gitleaks.toml +++ b/config/gitleaks.toml @@ -8,7 +8,7 @@ title = "gitleaks config" [[rules]] description = "AWS Secret Key" - regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]''' + regex = '''(?i)aws(.{0,20})?=.[\'\"0-9a-zA-Z\/+]{40}''' tags = ["key", "AWS"] [[rules]] diff --git a/scan/scan_test.go b/scan/scan_test.go index f98f4085..143860a5 100644 --- a/scan/scan_test.go +++ b/scan/scan_test.go @@ -33,7 +33,7 @@ func TestScan(t *testing.T) { Path: filepath.Join(repoBasePath, "with_square_and_google"), Report: filepath.Join(expectPath, "results_square_and_google.json.got"), ReportFormat: "json", - NoGit: true, + NoGit: true, }, wantPath: filepath.Join(expectPath, "results_square_and_google.json"), }, @@ -69,7 +69,6 @@ func TestScan(t *testing.T) { } } - func moveDotGit(from, to string) error { repoDirs, err := ioutil.ReadDir("../testdata/repos") if err != nil {