Skip to content

Commit

Permalink
Correct SBOM Generation Dependency SHAs (#3713)
Browse files Browse the repository at this point in the history
Provide SHAs for the individual JARs, rather than using the
CycloneDX core jar sha for non-CycloneDX jars.

Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley authored Mar 19, 2024
1 parent bb2b6c0 commit ec18e36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,9 @@ addCycloneDXVersions() {
for JAR in "${CYCLONEDB_DIR}/build/jar"/*.jar; do
JarName=$(basename "$JAR")
if [ "$(uname)" = "Darwin" ]; then
JarSha=$(shasum -a 256 "${CYCLONEDB_DIR}/build/jar/cyclonedx-core-java.jar" | cut -d' ' -f1)
JarSha=$(shasum -a 256 "$JAR" | cut -d' ' -f1)
else
JarSha=$(sha256sum "${CYCLONEDB_DIR}/build/jar/cyclonedx-core-java.jar" | cut -d' ' -f1)
JarSha=$(sha256sum "$JAR" | cut -d' ' -f1)
fi
addSBOMFormulationComponentProperty "${javaHome}" "${classpath}" "${sbomJson}" "CycloneDX" "CycloneDX jar SHAs" "${JarName}" "${JarSha}"
done
Expand Down

0 comments on commit ec18e36

Please sign in to comment.