mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Fix nil pointer dereference to git ScanOptions (#1603)
This commit is contained in:
parent
d062834997
commit
e322c4b29d
1 changed files with 3 additions and 0 deletions
|
@ -115,6 +115,9 @@ func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64,
|
|||
s.sourceId = sourceId
|
||||
s.jobId = jobId
|
||||
s.verify = verify
|
||||
if s.scanOptions == nil {
|
||||
s.scanOptions = &ScanOptions{}
|
||||
}
|
||||
|
||||
var conn sourcespb.Git
|
||||
if err := anypb.UnmarshalTo(connection, &conn, proto.UnmarshalOptions{}); err != nil {
|
||||
|
|
Loading…
Reference in a new issue