panic parsing cyclonedx (#892)

This commit is contained in:
Keith Zantow 2022-03-16 09:10:44 -04:00 committed by GitHub
parent b9b3ccecf9
commit ee0a1d172c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,8 +47,10 @@ func hasMetadata(p pkg.Package) bool {
func decodeComponent(c *cyclonedx.Component) *pkg.Package { func decodeComponent(c *cyclonedx.Component) *pkg.Package {
values := map[string]string{} values := map[string]string{}
for _, p := range *c.Properties { if c.Properties != nil {
values[p.Name] = p.Value for _, p := range *c.Properties {
values[p.Name] = p.Value
}
} }
p := &pkg.Package{ p := &pkg.Package{