Skip to content

Commit fd42686

Browse files
committed
feat: prepare for CycloneDX 1.7 support
1 parent afce196 commit fd42686

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

capycli/bom/bom_validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def display_help(self) -> None:
5555
print("optional arguments:")
5656
print(" -h, --help Show this help message and exit")
5757
print(" -i INPUTFILE Input BOM filename (JSON)")
58-
print(" -version SpecVersion CycloneDX spec version to validate against: allowed are 1.4, 1.5, and 1.6")
58+
print(" -version SpecVersion CycloneDX spec version to validate against: allowed are 1.4 ... 1.7")
5959
print(" -v be verbose (show more details about purl, download URL, and license)")
6060
print(" --forceerror force an error exit code in case of validation errors or warnings")
6161

capycli/common/capycli_bom_support.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from cyclonedx.model.definition import Definitions, Standard
2222
from cyclonedx.model.tool import ToolRepository
2323
from cyclonedx.output import make_outputter
24-
from cyclonedx.output.json import JsonV1Dot6
24+
from cyclonedx.output.json import JsonV1Dot6, JsonV1Dot7
2525
from cyclonedx.schema import OutputFormat, SchemaVersion
2626
from cyclonedx.validation.json import JsonStrictValidator
2727

@@ -564,6 +564,8 @@ def write_simple_sbom(cls, bom: SortedSet, outputfile: str) -> None:
564564
@classmethod
565565
def _string_to_schema_version(cls, spec_version: str) -> SchemaVersion:
566566
"""Convert the given string to a CycloneDX spec version."""
567+
if spec_version == "1.7":
568+
return SchemaVersion.V1_7
567569
if spec_version == "1.6":
568570
return SchemaVersion.V1_6
569571
if spec_version == "1.5":

0 commit comments

Comments
 (0)