Skip to content
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

Upgrade TemurinGenSBOM to use CycloneDX v9.0.5 spec 1.0.6 #3985

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

andrew-m-leonard
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard commented Oct 10, 2024

  • Upgrade to CycloneDX v9.0.5 spec 1.0.6 to support the new CycloneDX Attestations (CDXA) documents
  • Resolve issue with SBOM dependency jar versioning with the https://ci.adoptium.net/view/all/job/build.getDependency/ job
  • Allow local dependency cache dir, to allow jars to be pre-installed by ansible.... Added new --local-dependency-cache-dir build arg

Fixes #3970

@andrew-m-leonard andrew-m-leonard self-assigned this Oct 10, 2024
@github-actions github-actions bot added the testing Issues that enhance or fix our test suites label Oct 10, 2024
@andrew-m-leonard andrew-m-leonard marked this pull request as draft October 11, 2024 08:22
@andrew-m-leonard andrew-m-leonard marked this pull request as ready for review November 1, 2024 10:28
Copy link
Contributor

@adamfarley adamfarley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrew-m-leonard andrew-m-leonard marked this pull request as draft November 4, 2024 09:26
@github-actions github-actions bot added the documentation Issues that request updates to our documentation label Nov 6, 2024
@andrew-m-leonard andrew-m-leonard marked this pull request as ready for review November 6, 2024 15:36
@@ -887,23 +887,30 @@ buildCyclonedxLib() {
else
ANTBUILDFILE="${CYCLONEDB_DIR}/build.xml"
fi

# Do we have a local cache for the dependency jars?
local localJarCacheOption=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a default value for this since it's likely to be in a common location on all machines, and it would be good to use the cached version automatically if it is available instead of requiring it to use a build option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sxa bearing in mind "users" can use this script, do you see it a reasonable default for users in general?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also what should the default be, and i'd need to add platform specific differences here..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my assumption was we would specify the adoptium ci defaults in the ci-jenkins-pipelines job configs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not specifying a default location within the script itself, I advise that we add error checking for a blank value.

Example below.

if [ "$(uname)" = "Darwin" ]; then
JarSha=$(shasum -a 256 "$JAR" | cut -d' ' -f1)
else
JarSha=$(sha256sum "$JAR" | cut -d' ' -f1)
fi
addSBOMFormulationComponentProperty "${javaHome}" "${classpath}" "${sbomJson}" "CycloneDX" "CycloneDX jar SHAs" "${JarName}" "${JarSha}"
addSBOMFormulationComponentProperty "${javaHome}" "${classpath}" "${sbomJson}" "CycloneDX" "CycloneDX jar SHAs" "${JarName}.jar" "${JarSha}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for stripping off the .jar extension a few lines above then adding it back in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sxa because line 1230 index into the dependency_data.properties needs just the component name, so i'd need to strip it for that...

sbin/build.sh Show resolved Hide resolved
@adamfarley adamfarley self-requested a review November 7, 2024 11:09
Copy link
Contributor

@adamfarley adamfarley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues that request updates to our documentation testing Issues that enhance or fix our test suites
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade temurin-build/cyclonedx-lib build to use cyclonedx-core-java latest "1.6 spec" release
3 participants