Skip to content

Commit

Permalink
Fix bug with iterating through and adding containers to CycloneDX SBOM (
Browse files Browse the repository at this point in the history
  • Loading branch information
nightlark authored Apr 19, 2024
1 parent 9efb802 commit fba453f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion surfactant/output/cyclonedx_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def write_sbom(sbom: SBOM, outfile) -> None:
# Create CycloneDX Components for every software entry
# start with software entries that act as containers for other software entries
if sbom.has_relationship(xUUID=software.UUID, relationship="Contains"):
for _, container in convert_software_to_cyclonedx_container_components(software):
_, container_list = convert_software_to_cyclonedx_container_components(software)
for container in container_list:
bom.components.add(container)
else:
for parent_uuid, _, file in convert_software_to_cyclonedx_file_components(software):
Expand Down

0 comments on commit fba453f

Please sign in to comment.