mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] report/cyclonedx_sbom: add propietary to ignore list
@ 2025-11-06 11:31 Michael Grzeschik
       [not found] ` <GVXPR03MB1120133FA7FF367A45F8CFB4CF4C2A@GVXPR03MB11201.eurprd03.prod.outlook.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2025-11-06 11:31 UTC (permalink / raw)
  To: ptxdist

Some packages in customer BSPs have internaly set proprietary in their
license tag. Those packages should be ignored in the license parsing.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 scripts/report/cyclonedx_sbom.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/report/cyclonedx_sbom.py b/scripts/report/cyclonedx_sbom.py
index 70bf7ab7a..594824f3f 100644
--- a/scripts/report/cyclonedx_sbom.py
+++ b/scripts/report/cyclonedx_sbom.py
@@ -72,7 +72,7 @@ class CycloneDXSbomGenerator(SbomGenerator):
         )
 
         if licenses := pkg.get('licenses', None):
-            if licenses != 'ignore':
+            if licenses != 'ignore' and licenses != 'proprietary':
                 component.licenses = [
                     self.lc_factory.make_from_string(licenses)]
 
@@ -93,7 +93,7 @@ class CycloneDXSbomGenerator(SbomGenerator):
                     lic.url = prefix + file_path
                 license_list.append(lic)
             component.evidence = ComponentEvidence(licenses=license_list)
-        elif licenses != 'ignore' and not parent:
+        elif licenses != 'ignore' and licenses != 'proprietary' and not parent:
             print(f'Warning: missing license-files for "{pkg_name}"')
 
         if urls := pkg.get('url', None):
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-06 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 11:31 [ptxdist] [PATCH] report/cyclonedx_sbom: add propietary to ignore list Michael Grzeschik
     [not found] ` <GVXPR03MB1120133FA7FF367A45F8CFB4CF4C2A@GVXPR03MB11201.eurprd03.prod.outlook.com>
2025-11-06 13:10   ` Michael Grzeschik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox