mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Check that required info is present (#415)
This commit is contained in:
parent
1f55171437
commit
09de492ec9
1 changed files with 4 additions and 0 deletions
|
@ -279,6 +279,10 @@ func (s *Git) ScanCommits(repo *git.Repository, path string, scanOptions *ScanOp
|
|||
var depth int64
|
||||
var reachedBase = false
|
||||
for 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")
|
||||
|
|
Loading…
Reference in a new issue