From 4b08c5db324e61a1afdae7cae64940703e9dc6df Mon Sep 17 00:00:00 2001 From: Matias Daloia Date: Mon, 14 Jul 2025 13:05:16 +0200 Subject: [PATCH 1/2] [SP-2912] fix: cdx format error when license id is none --- src/scanoss/cyclonedx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scanoss/cyclonedx.py b/src/scanoss/cyclonedx.py index 030dd3e..afb9f2e 100644 --- a/src/scanoss/cyclonedx.py +++ b/src/scanoss/cyclonedx.py @@ -219,6 +219,8 @@ def produce_from_json(self, data: json, output_file: str = None) -> tuple[bool, lic_set = set() for lic in licenses: # Get a unique set of licenses lc_id = lic.get('id') + if not lc_id: + continue spdx_id = self._spdx.get_spdx_license_id(lc_id) lic_set.add(spdx_id if spdx_id else lc_id) for lc_id in lic_set: # Store licenses for later inclusion From 60071c309396ccc82f18357e9f05b18f1bdf16de Mon Sep 17 00:00:00 2001 From: Matias Daloia Date: Mon, 14 Jul 2025 14:36:58 +0200 Subject: [PATCH 2/2] [SP-2912] chore: bump version --- CHANGELOG.md | 5 +++++ src/scanoss/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00dada9..24d56a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Upcoming changes... +## [1.28.2] - 2025-07-14 +### Fixed +- Fix CycloneDX format when license id is None + ## [1.28.1] - 2025-07-10 ### Added - Fix purls parsing on `crypto` subcommand @@ -593,3 +597,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [1.27.1]: https://github.com/scanoss/scanoss.py/compare/v1.27.0...v1.27.1 [1.28.0]: https://github.com/scanoss/scanoss.py/compare/v1.27.1...v1.28.0 [1.28.1]: https://github.com/scanoss/scanoss.py/compare/v1.28.0...v1.28.1 +[1.28.2]: https://github.com/scanoss/scanoss.py/compare/v1.28.1...v1.28.2 diff --git a/src/scanoss/__init__.py b/src/scanoss/__init__.py index 7cb5f83..8530ab3 100644 --- a/src/scanoss/__init__.py +++ b/src/scanoss/__init__.py @@ -22,4 +22,4 @@ THE SOFTWARE. """ -__version__ = '1.28.1' +__version__ = '1.28.2'