javascript cataloger: node binary: nil pointer dereference (#1313)

Co-authored-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Kenny Moens 2022-11-03 15:38:49 +01:00 committed by GitHub
parent 3e99c4d7d8
commit bc9740d50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,8 +36,8 @@ func parseNodeBinary(_ source.FileResolver, _ *generic.Environment, reader sourc
// TODO add node specific metadata to the packages to help with vulnerability matching
if p != nil {
p.Language = pkg.JavaScript
p.SetID()
return []pkg.Package{*p}, nil, nil
}
p.SetID()
return nil, nil, nil
}