Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Fix nil pointer dereference to git ScanOptions (#1603)
Miccahe322c4b29d56
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex 5148c7bb6..f224ef5f7 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -115,6 +115,9 @@ func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64,s.sourceId = sourceIds.jobId = jobIds.verify = verify+ if s.scanOptions == nil {+ s.scanOptions = &ScanOptions{}+ }var conn sourcespb.Gitif err := anypb.UnmarshalTo(connection, &conn, proto.UnmarshalOptions{}); err != nil {