mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
adding logic to ignore gitleaks config during scans (#710)
This commit is contained in:
1 parent
a37822dffd
commit
4acd7a3c8d
6 files changed
+22
-3
No files matched your search
+2
-2
@@ -19,8 +19,8 @@ func DetectFindings(cfg config.Config, b []byte, filePath string, commit string)
|
||||
var findings []report.Finding
|
||||
linePairs := regexp.MustCompile("\n").FindAllIndex(b, -1)
|
||||
|
||||
// check if we should skip file based on the global allowlist
|
||||
if cfg.Allowlist.PathAllowed(filePath) {
|
||||
// check if we should skip file based on the global allowlist or if the file is the same as the gitleaks config
|
||||
if cfg.Allowlist.PathAllowed(filePath) || filePath == cfg.Path {
|
||||
return findings
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user