Skip to content

Find, verify, and analyze leaked credentials

Fix nil scan options (#1107)

Miccahc6826c4574b1
diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.go
index 4613942c2..c0c6fe6c0 100644
--- a/pkg/sources/github/github.go
+++ b/pkg/sources/github/github.go
@@ -519,6 +519,11 @@ func (s *Source) scan(ctx context.Context, installationClient *github.Client, ch
reposToScan, progressIndexOffset := sources.FilterReposToResume(s.repos, s.GetProgress().EncodedResumeInfo)
s.repos = reposToScan
+ // Setup scan options if it wasn't provided.
+ if s.scanOptions == nil {
+ s.scanOptions = &git.ScanOptions{}
+ }
+
var scanErrs []error
for i, repoURL := range s.repos {
i, repoURL := i, repoURL