mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
Global allowlist regex (#422)
* work in progress * Update test configs * adding test * golint and change to allowlist * fix race condition, this mistakenly got committed * Updating tests and examples * bump to v6 as this is a breaking change to the config * More consistent variables
This commit is contained in:
1 parent
6129b1a15d
commit
fae366a404
69 files changed
+449
-204
No files matched your search
+13
-3
@@ -10,9 +10,9 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v5/config"
|
||||
"github.com/zricethezav/gitleaks/v5/manager"
|
||||
"github.com/zricethezav/gitleaks/v5/options"
|
||||
"github.com/zricethezav/gitleaks/v6/config"
|
||||
"github.com/zricethezav/gitleaks/v6/manager"
|
||||
"github.com/zricethezav/gitleaks/v6/options"
|
||||
|
||||
"github.com/sergi/go-diff/diffmatchpatch"
|
||||
)
|
||||
@@ -385,6 +385,16 @@ func TestScan(t *testing.T) {
|
||||
},
|
||||
wantPath: "../test_data/test_local_repo_eight.json",
|
||||
},
|
||||
{
|
||||
description: "test local repo nine",
|
||||
opts: options.Options{
|
||||
RepoPath: "../test_data/test_repos/test_repo_9",
|
||||
Report: "../test_data/test_local_repo_nine_aws_leak.json.got",
|
||||
Config: "../test_data/test_configs/large_with_global_allowlist_regex.toml",
|
||||
ReportFormat: "json",
|
||||
},
|
||||
wantPath: "../test_data/test_local_repo_nine_aws_leak.json",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in new issue
Block a user