Multiple cpe experiments, failed. Add reimport feature.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-07-11 13:29:02 +02:00
parent 6811740835
commit e85858d342
4 changed files with 88 additions and 71 deletions

View File

@@ -9,6 +9,7 @@ from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component, ComponentType
from cyclonedx.model.contact import OrganizationalEntity
from cyclonedx.model import XsUri
from cyclonedx.model import ExternalReference
from cyclonedx.output.json import JsonV1Dot5
class MyLocalConverterException(Exception): pass
@@ -54,7 +55,9 @@ def minimalSbomFormatConverter(minimalSbom, classifier):
minimalSbomObject = yaml.safe_load(minimalSbom)
logger.debug(f"{minimalSbomObject=}")
bom = Bom()
bom = Bom(
version=minimalSbomObject['sbomVersion']
)
bom.metadata.tools.components.add(cdx_lib_component())
bom.metadata.tools.components.add(Component(
name='sbom-dt-dd',