mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 04:34:46 +01:00
fixing a bug, adding csv report option and leak caching
This commit is contained in:
1 parent
c6934f5eab
commit
3211cfbbb1
5 files changed
+267
-55
No files matched your search
@@ -270,6 +270,20 @@ func inspectCommit(c *object.Commit, repo *Repo) error {
|
||||
log.Debugf("whitelisted file found, skipping audit of file: %s", f.Name)
|
||||
return nil
|
||||
}
|
||||
|
||||
if fileMatched(f.Name, repo.config.FileRegex) {
|
||||
repo.Manager.SendLeaks(manager.Leak{
|
||||
Line: "N/A",
|
||||
Offender: f.Name,
|
||||
Commit: c.Hash.String(),
|
||||
Repo: repo.Name,
|
||||
Rule: "file regex matched" + repo.config.FileRegex.String(),
|
||||
Author: c.Author.Name,
|
||||
Email: c.Author.Email,
|
||||
Date: c.Author.When,
|
||||
File: f.Name,
|
||||
})
|
||||
}
|
||||
content, err := f.Contents()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user