Skip to content
Open
Changes from all commits
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
5 changes: 3 additions & 2 deletions extensions/commands/sbom/cmd_cyclonedx.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def cyclonedx(conan_api: ConanAPI, parser, *args) -> 'Bom':

try:
from cyclonedx.factory.license import LicenseFactory
from cyclonedx.model import ExternalReference, ExternalReferenceType, Tool, XsUri
from cyclonedx.model import ExternalReference, ExternalReferenceType, OrganizationalEntity, Tool, XsUri
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component, ComponentType
from cyclonedx.model.license import License
Expand Down Expand Up @@ -102,7 +102,8 @@ def create_component(node) -> Component:
component = Component(
type=package_type_to_component_type(node.conanfile.package_type),
name=node.name or f'UNKNOWN.{id(node)}',
author=node.conanfile.author if node.conanfile.author else "Conan",
Copy link
Contributor

@jkowalleck jkowalleck Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was wrong in the first place: "Conan" is a tool, not a legal entity, and may not be an author nor supplier.

author=node.conanfile.author if node.conanfile.author else None,
supplier=OrganizationalEntity(name="Conan"),
version=node.conanfile.version,
licenses=licenses(node.conanfile.license),
bom_ref=purl.to_string() if purl else None,
Expand Down