mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Bug 553 global allowlist (#554)
* add global file check * rm whitespace
This commit is contained in:
1 parent
e6934bf0a5
commit
12d276acd7
1 file changed
+6
@@ -184,6 +184,12 @@ func (us *UnstagedScanner) Scan() (Report, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if file is allow listed
|
||||||
|
if us.cfg.Allowlist.FileAllowed(filepath.Base(filename)) ||
|
||||||
|
us.cfg.Allowlist.PathAllowed(filename) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
dmp := diffmatchpatch.New()
|
dmp := diffmatchpatch.New()
|
||||||
diffs := dmp.DiffMain(prevFileContents, currFileContents, false)
|
diffs := dmp.DiffMain(prevFileContents, currFileContents, false)
|
||||||
prettyDiff := diffPrettyText(diffs)
|
prettyDiff := diffPrettyText(diffs)
|
||||||
|
|||||||
Reference in new issue
Block a user