Skip to content

Find, verify, and analyze leaked credentials

Use author email (#85)

Bill Richfaf30fe8fe89
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go
index 7542c01d9..f9a549c29 100644
--- a/pkg/sources/git/git.go
+++ b/pkg/sources/git/git.go
@@ -295,8 +295,8 @@ func (s *Git) ScanCommits(repo *git.Repository, path string, scanOptions *ScanOp
}
var email, hash, when string
if file.PatchHeader != nil {
- if file.PatchHeader.Committer != nil {
- email = file.PatchHeader.Committer.Email
+ if file.PatchHeader.Author != nil {
+ email = file.PatchHeader.Author.Email
}
hash = file.PatchHeader.SHA
when = file.PatchHeader.AuthorDate.String()