mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Initialize scan options if given a nil pointer (#924)
This commit is contained in:
parent
696f5c68f4
commit
86f9e1288f
1 changed files with 3 additions and 0 deletions
|
@ -540,6 +540,9 @@ func (s *Git) ScanUnstaged(ctx context.Context, repo *git.Repository, path strin
|
|||
}
|
||||
|
||||
func (s *Git) ScanRepo(ctx context.Context, repo *git.Repository, repoPath string, scanOptions *ScanOptions, chunksChan chan *sources.Chunk) error {
|
||||
if scanOptions == nil {
|
||||
scanOptions = NewScanOptions()
|
||||
}
|
||||
if err := normalizeConfig(scanOptions, repo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue