diff --git a/utils/generate-cyclonedx b/utils/generate-cyclonedx index 9d3baa23f1..1fbf020a3d 100755 --- a/utils/generate-cyclonedx +++ b/utils/generate-cyclonedx @@ -562,6 +562,10 @@ def main(): filtered_show_info_dict = {k: v for k, v in show_info_dict.items() if ("rootfs" not in v["type"]) and (args.virtual or v["virtual"] is False)} + # Only keep the first two numbers of the 'cdx-version' argument. + # While the patch revision (e.g. 1.6.2) can be used for the license list, + # only the first two numbers (e.g. 1.6) are valid in the schema and the + # 'specVersion'. cdx_spec_version = ".".join(args.cdx_version.split(".")[:2]) cyclonedx_dict = { "bomFormat": "CycloneDX",