Skip to content

Commit b748ec0

Browse files
authored
Merge pull request #222 from nokia/fix-SBOM-type-issue
fixed a bug when the CISA SBOM type was followed by another line of t…
2 parents 39d1aec + d5824b8 commit b748ec0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

tools/openchain_telco_sbom_validator/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
A script to validate SBOMs against
44
the [OpenChain Telco SBOM Guide](https://github.com/OpenChain-Project/Telco-WG/blob/main/OpenChain-Telco-SBOM-Guide_EN.md).
55

6+
What is new in version 0.3.3:
7+
* fixed a bug when the CISA SBOM type was followed by another line of text in the comment.
8+
69
What is new in version 0.3.2:
710
* option `--strict-url-check` now also checks the value of the PackageChecksum if present.
811

tools/openchain_telco_sbom_validator/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = openchain-telco-sbom-validator
3-
version = 0.3.2
3+
version = 0.3.3
44
author = Gergely Csatari, Marc-Etienne Vargenau
55
author_email = gergely.csatari@nokia.com, marc-etienne.vargenau@nokia.com
66
description = Validator against versions 1.0 and 1.1 of the OpenChain Telco SBOM Guide

tools/openchain_telco_sbom_validator/src/openchain_telco_sbom_validator/validator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ def validate(self,
377377
# Remove punctuation
378378
translator = str.maketrans('', '', string.punctuation)
379379
creator_comment = creator_comment.translate(translator)
380+
# Replace carriage return and line feed by space
381+
creator_comment = creator_comment.replace('\r', ' ').replace('\n', ' ')
380382
tokens = re.split(r'[ :]+', creator_comment)
381383
logger.debug(f"Strict check is off. (CreatorComment words: {tokens})")
382384
if not any(sbom_type in tokens for sbom_type in cisaSBOMTypes):

0 commit comments

Comments
 (0)