-
-
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
Capture CycloneDX JAR SHAs in SBoM #3538
Conversation
Signed-off-by: Stewart X Addison <[email protected]>
Signed-off-by: Stewart X Addison <[email protected]>
@sxa One thought would be do we need the other dependencies as well that cyclonedx pulls in jackson... temurin-build/cyclonedx-lib/build.xml Line 46 in c7f1ad1
|
Yeah I reckon I'd be ok with that as another potential option for retrieving the details. Any thoughts on the format of the entries in the SBoM file? |
I asked on the CycloneDX slack, I think this is where we should have these: |
Signed-off-by: Stewart X Addison <[email protected]>
Looks like the formulation classes aren't available in our cyclonedx-core-java.jar, so I'm not sure how to do this. |
Signed-off-by: Stewart X Addison <[email protected]>
@sxa Formulation support was added to v1.5 of the CycloneDX specification, which is supported in cyclonedx-core-java v8.0 and higher. If your version of the jar does not support formulation, its likely an older version. The recommendation would be to update the jar to the current release. |
Yeah looks like we're on 1.4 just now so will need to upgrade if we're going to use that field for this. I guess https://cyclonedx.github.io/cyclonedx-core-java/org/cyclonedx/model/formulation/Formula.html is the class I'll need for the Formulation section? |
Current plan of action after discussion with @andrew-m-leonard: Step 1: Update the version of CycloneDX to 8.0.3:Note: Plan would be to merge phase 1 next week - ideally Monday morning - as doing something like this on a Friday afternoon is asking for trouble :-)
The above are covered under #3558 Step 2: Add the support to generate a Formulation section in our SBoM):(Note that this step can be done indepedent of step 1, but step 1 will need to be completed before we can merge step 2 as it will have a dependency on the new jars)
Noting also that CycloneDX (unsurprisingly!) provides GPG signatures and we should look to validate those instead of relying on fixed SHA checksums in order to make the process of upgrading easier (and because it's a better way of verifying) |
Signed-off-by: Stewart X Addison <[email protected]>
d77d8f7
to
28712a8
Compare
Note to reviewers: please allow me to merge this when approved. Unless reviews explicitly object I'd like to merge this and then sort out the naming of the formulation entry (BomRef) in a subsequent PR to avoid accessing entry |
cant access the pipeline test build. |
Signed-off-by: Stewart X Addison <[email protected]>
Latest push has resolved this and is using a BomRef of
A couple of quesions (Maybe for @stevespringett ?)
Re-running full pipeline test at https://ci.adoptium.net/job/build-scripts/job/openjdk21-pipeline/230/console which has spawned: The next three pushes were linter/comment fixes and do not impact functionality or invalidate those jobs. |
a0bb853
to
09b8235
Compare
Signed-off-by: Stewart X Addison <[email protected]>
09b8235
to
cf7f8ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
build runs are failing with an error compiling the TKG code:
Should be unrelated to this PR |
Note to reviewers: please allow me to merge this when approved.
This is a test of including the CycloneDX jars (downloaded during the build process) into the SBoM.
There are several JAR files associated with the CycloneDX tool and this only covers one of them so is a "discussion starter" (hence raising this as a draft) as to how we should move forward if we want to capture this information in the SBoM. Is this the right place for it to be stored? Do we definitely need it? Would we exclude it if we downloaded this onto the machines via the playbooks? If we capture all of the JAR SHAs then what should the format be?
Cc @andrew-m-leonard @netomi - this is part of satisfying #3535
References to the new Formula stuff in CycloneDX 1.5 used in this PR: