From: Quentin Schulz via buildroot <buildroot@buildroot.org>
To: Thomas Perale <thomas.perale@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v5 5/8] utils/generate-cyclonedx: optional bump to v1.7
Date: Thu, 9 Apr 2026 14:40:01 +0200 [thread overview]
Message-ID: <67394df1-d461-4672-ba43-30696e505500@cherry.de> (raw)
In-Reply-To: <20260311140457.140041-6-thomas.perale@mind.be>
Hi Thomas,
On 3/11/26 3:04 PM, Thomas Perale via buildroot wrote:
> See changes:
>
> - https://cyclonedx.org/news/cyclonedx-v1.7-released/
> - https://github.com/CycloneDX/specification/releases/tag/1.7
>
> Since some tools like DependencyTrack don't support CycloneDX SBOM v1.7
> this bump is optional and default remains v1.6.
>
> To allow generation of CycloneDX based on the current version of the
> spec we are using a 'Context' datastructure is created that reference
> the CycloneDX version spec currently in use.
>
> This Context datastructure is then passed down to functions that
> generate part of the CycloneDX SBOM.
>
> All the top level datastructure are moved into the Context
> datastructure that will be generated after the arguments from the
> command line are interpreted.
>
> Signed-off-by: Thomas Perale <thomas.perale@mind.be>
> ---
> utils/generate-cyclonedx | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/utils/generate-cyclonedx b/utils/generate-cyclonedx
> index 24c15df94e..cbce3364de 100755
> --- a/utils/generate-cyclonedx
> +++ b/utils/generate-cyclonedx
> @@ -21,8 +21,7 @@ import re
> from typing import Mapping, Tuple
> from dataclasses import dataclass, field
>
> -
> -CYCLONEDX_VERSION = (1, 6)
> +DEFAULT_CYCLONEDX_VERSION = (1, 6)
>
> brpath = Path(__file__).parent.parent
>
> @@ -493,6 +492,9 @@ def main():
> help="Specify the project name to use in the SBOM metadata (default:'buildroot')")
> parser.add_argument("--project-version", type=str, default=f"{BR2_VERSION_FULL}",
> help="Specify the project version to use in the SBOM metadata (default: builroot version)")
> + parser.add_argument("--v17", dest='cdx_version', action='store_const',
> + const=(1, 7), default=DEFAULT_CYCLONEDX_VERSION,
> + help=f"Use CycloneDX version 1.7 (default: {DEFAULT_CYCLONEDX_VERSION})")
>
How about making this a choice instead so we can easily extend this
later on? c.f. https://docs.python.org/3/library/argparse.html#choices
Then use it with generate-cyclonedx --cyclone-sbom-vers 1.7 for example.
Otherwise I'm afraid we're going to have to add more --v arguments and
handle them separately (or I guess with a mutual exclusion group).
Cheers,
Quentin
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-04-09 12:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 14:04 [Buildroot] [PATCH v5 0/8] Support CycloneDX v1.7 Thomas Perale via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 1/8] utils/generate-cyclonedx: use tuple for version Thomas Perale via buildroot
2026-04-09 12:08 ` Quentin Schulz via buildroot
2026-04-09 20:27 ` Thomas Perale via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 2/8] utils/generate-cyclonedx: move license download in a function Thomas Perale via buildroot
2026-04-09 12:12 ` Quentin Schulz via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 3/8] utils/generate-cyclonedx: move utility function Thomas Perale via buildroot
2026-04-09 12:27 ` Quentin Schulz via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 4/8] utils/generate-cyclonedx: encapsulate CycloneDX generation functions Thomas Perale via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 5/8] utils/generate-cyclonedx: optional bump to v1.7 Thomas Perale via buildroot
2026-04-09 12:40 ` Quentin Schulz via buildroot [this message]
2026-03-11 14:04 ` [Buildroot] [PATCH v5 6/8] utils/generate-cyclonedx: mark host packages as external Thomas Perale via buildroot
2026-04-09 12:58 ` Quentin Schulz via buildroot
2026-04-09 20:42 ` Thomas Perale via buildroot
2026-04-09 20:43 ` Thomas Perale via buildroot
2026-04-10 9:12 ` Quentin Schulz via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 7/8] utils/generate-cyclonedx: add 'id' property to resolves Thomas Perale via buildroot
2026-04-09 13:22 ` Quentin Schulz via buildroot
2026-04-09 20:24 ` Thomas Perale via buildroot
2026-03-11 14:04 ` [Buildroot] [PATCH v5 8/8] utils/generate-cyclonedx: split vulnerabilities per state Thomas Perale via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67394df1-d461-4672-ba43-30696e505500@cherry.de \
--to=buildroot@buildroot.org \
--cc=quentin.schulz@cherry.de \
--cc=thomas.perale@mind.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox