-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a Cyclone DX SBOM equivalent to the current build build-info json metadata #2753
Comments
@SehrishHussain fyi |
@andrew-m-leonard So, I searched in CycloneDX Tool Center as well as the github repository for CycloneDX (github CycloneDX) yet I couldn't find the right tool to convert the above Json file into CycloneDX SBoM. |
@SehrishHussain this link provides some useful "usecases": https://cyclonedx.org/use-cases/ |
related: #2681 |
@SehrishHussain Looking at the use case examples, take the Inventory example, for us we could generate:
|
@andrew-m-leonard my question was/is still the same i.e. how/where do we generate these CycloneDX SBoM? I have been searching over the internet and asked Patrick Dwyer he is the core team of CycloneDX, we have scheduled a call this week. So far, we have to use multiple tools to generate SBoM. |
So far this is what I have learnt in generating SBOMs. Steps to generate CycloneDX SBOMs:
@andrew-m-leonard @sxa you want to add to the process I mentioned above? |
@andrew-m-leonard @smlambert Industry best practices suggest to automate SBOM but for starters I have created one manually. Please, take a look. `
} |
@SehrishHussain great work Sehrish, that looks a great first schema. |
@andrew-m-leonard thank you, I'm learning to understand it better. I will organize the BUILT_CONFIG info. Meanwhile would you assign this task to me. I assume that's how we do it for Outreachy applicants. |
@andrew-m-leonard I have categorized each key-value pairs for "BUILT_CONFIGURATION". "BUILD_CONFIGURATION": { JSON file: |
@andrew-m-leonard I've created first automated SBOM. It's very basic but its automated. Used CycloneDX CLI tool and above Json file. I need to build Temurin locally, for some unkown reason my machine isn't building. Anyhow, I thought to share it here. I will get a new machine with Ubuntu and hopefully will build jdk binaries locally as it is the first step for automating SBOM. Its a JSON file so can't attach it here. Here is the content of file. |
That's great @SehrishHussain , let me know if you need help getting your local build working. |
@andrew-m-leonard yes please, that would be very helpful. Where can we do this demo? |
@SehrishHussain the above CycloneDX JSON looks good. What we need to do next is get that produced as an output of the build. That probably means something along the lines of the following:
Feel free to discuss your ideas and designs here.. |
CycloneDX core-java tool provides Bom json generators which we can use to call from the Jenkins pipline: The pipeline write metadata code here: https://github.com/adoptium/ci-jenkins-pipelines/blob/9556d1f74dfe9ad5cb2dcf14df33468a171533f0/pipelines/build/common/openjdk_build_pipeline.groovy#L921 The Java app AdoptiumGenSBOM, could be have a command line interface like:
|
@SehrishHussain the PR for the CycloneDX jenkins build integration is now merged: #2805 To allow you to extend and test changes/additions to TemurinGenSBOM.java, you can run it as follows:
Building/running..
build.xml "run" target just invokes TemurinGenSBOM with no args, you can change that to test whatever you need.. Next step is to "design" how we transform/gather the temurin build-info to call this app, so look at what "build-info" we currently have, and how that would be represented in the SBOM? The design a command line to achieve this, example:
|
This is now complete, and can be enabled by specifying a buildArg of --create-sbom |
As part of the strategy to supply Cyclone DX SBOM info for Adoptium binaries, this issue covers the initial task of creating a Cyclone DX SBOM equivalent of the current binary metadata build-info.
This metadata can be seen here as an example: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz.json
To view these files it is best to download and view using a suitable JSON viewer. (you can download, and open in a browser).
This JSON contains numerous pieces of "build-info",eg:
The intention of this task is to take this current build-info and generate a CycloneDX SBOM for it.
The text was updated successfully, but these errors were encountered: