Rm generic from default (#379)

* fixing commit latest bug

* remove generic rule from default to reduce false positives
This commit is contained in:
Zachary Rice authored and GitHub committed 2020-05-09 11:21:17 -04:00
1 parent e4b26aea4a
commit b7438011b4
17 files changed
+20 -877

No files matched your search

+2
View File
@@ -270,6 +270,7 @@ func TestAudit(t *testing.T) {
Report: "../test_data/test_local_repo_five_commit.json.got",
Commit: "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
ReportFormat: "json",
Config: "../test_data/test_configs/generic.toml",
},
wantPath: "../test_data/test_local_repo_five_commit.json",
},
@@ -280,6 +281,7 @@ func TestAudit(t *testing.T) {
Report: "../test_data/test_local_repo_five_at_latest_commit.json.got",
Commit: "latest",
ReportFormat: "json",
Config: "../test_data/test_configs/generic.toml",
},
wantPath: "../test_data/test_local_repo_five_at_latest_commit.json",
},
+2 -2
View File
@@ -12,11 +12,11 @@ import (
"github.com/zricethezav/gitleaks/v4/config"
"github.com/zricethezav/gitleaks/v4/manager"
log "github.com/sirupsen/logrus"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
fdiff "github.com/go-git/go-git/v5/plumbing/format/diff"
"github.com/go-git/go-git/v5/plumbing/object"
log "github.com/sirupsen/logrus"
)
// Inspect patch accepts a patch, commit, and repo. If the patches contains files that are
@@ -390,7 +390,7 @@ func isFilePathWhiteListed(filepath string, whitelist []config.Whitelist) bool {
return false
}
// RegexMatched matched an interface to a regular expression. The interface f can
// RegexMatched matched an interface to a regular expression. The interface f can
// be a string type or go-git *object.File type.
func RegexMatched(f interface{}, re *regexp.Regexp) bool {
if re == nil {