Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sbom): parse type framework as library when unmarshalling CycloneDX files #7527

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(cyclonedx): unmarshal framework components as library
  • Loading branch information
DmitriyLewen committed Sep 17, 2024
commit 550d288c29a1dbb3e76721345822f9521ab0f7a7
5 changes: 4 additions & 1 deletion pkg/sbom/cyclonedx/unmarshal.go
Original file line number Diff line number Diff line change
@@ -166,7 +166,10 @@ func (b *BOM) unmarshalType(t cdx.ComponentType) (core.ComponentType, error) {
ctype = core.TypeContainerImage
case cdx.ComponentTypeApplication:
ctype = core.TypeApplication
case cdx.ComponentTypeLibrary:
// There are not many differences between a `library` and a `framework` components, and sometimes it is difficult to choose the right type.
// That is why some users choose `framework` type.
// So we should parse and scan `framework` components as libraries.
case cdx.ComponentTypeLibrary, cdx.ComponentTypeFramework:
ctype = core.TypeLibrary
case cdx.ComponentTypeOS:
ctype = core.TypeOS