Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Check that required info is present (#415)
Bill Rich09de492ec9c4
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex e13335040..862462b37 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -279,6 +279,10 @@ func (s *Git) ScanCommits(repo *git.Repository, path string, scanOptions *ScanOpvar depth int64var reachedBase = falsefor file := range fileChan {+ if file == nil || file.PatchHeader == nil {+ log.Debugf("file missing patch header, skipping")+ continue+ }log.WithField("commit", file.PatchHeader.SHA).WithField("file", file.NewName).Trace("Scanning file from git")if scanOptions.MaxDepth > 0 && depth >= scanOptions.MaxDepth {log.Debugf("reached max depth")