We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfbee0a commit 8f9eb2eCopy full SHA for 8f9eb2e
sbomdiff/cyclonedx_parser.py
@@ -66,11 +66,12 @@ def parse_cyclonedx_xml(self, sbom_file):
66
if component_version is None:
67
raise KeyError(f"Could not find version in {component}")
68
version = component_version.text
69
- component_license = component.find(schema + "license")
70
- if component_license is None:
71
- license = "NOT FOUND"
72
- else:
73
- license = component_license.text
+ license = "NOT FOUND"
+ component_license = component.find(schema + "licenses")
+ if component_license is not None:
+ license_data = component_license.find(schema + "expression")
+ if license_data is not None:
74
+ license = license_data.text
75
if version is not None:
76
if package not in packages:
77
packages[package] = [version, license]
0 commit comments