Skip to content

HBASE-27562 Publish SBOM artifacts - #4953

Merged
Apache9 merged 2 commits into
apache:masterfrom
dongjoon-hyun:HBASE-27562
Jan 20, 2023
Merged

HBASE-27562 Publish SBOM artifacts#4953
Apache9 merged 2 commits into
apache:masterfrom
dongjoon-hyun:HBASE-27562

Conversation

@dongjoon-hyun

Copy link
Copy Markdown
Member

This PR aims to publish SBOM artifacts along with the other Apache projects.

Here is an article to give some context.

Software Bill of Materials (SBOM) are additional artifacts containing the aggregate of all direct and transitive dependencies of a project. The US Government (based on NIST recommendations) currently accepts only the three most popular SBOM standards as valid, namely: CycloneDX, Software Identification (SWID) tag, Software Package Data Exchange® (SPDX).

We can use one of the Maven plugin, CycloneDX maven plugin, a lightweight software bill of materials (SBOM) standard designed for use in application security contexts and supply chain component analysis.

https://maven.apache.org/plugins/index.html#misc

The expected results

$ mvn install -DskipTests
...
$ ls -al ~/.m2/repository/org/apache/hbase/hbase-common/3.0.0-alpha-4-SNAPSHOT
total 5064
drwxr-xr-x 11 dongjoon staff 352 Jan 9 18:28 .
drwxr-xr-x 4 dongjoon staff 128 Jan 9 18:28 ..
-rw-r--r-- 1 dongjoon staff 482 Jan 9 18:28 _remote.repositories
-rw-r--r-- 1 dongjoon staff 159174 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT-cyclonedx.json
-rw-r--r-- 1 dongjoon staff 139170 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT-cyclonedx.xml
-rw-r--r-- 1 dongjoon staff 684842 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT-sources.jar
-rw-r--r-- 1 dongjoon staff 267751 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT-test-sources.jar
-rw-r--r-- 1 dongjoon staff 443154 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT-tests.jar
-rw-r--r-- 1 dongjoon staff 871542 Jan 9 18:28 hbase-common-3.0.0-alpha-4-SNAPSHOT.jar
-rw-r--r-- 1 dongjoon staff 6620 Jan 9 18:27 hbase-common-3.0.0-alpha-4-SNAPSHOT.pom
-rw-r--r-- 1 dongjoon staff 1811 Jan 9 18:28 maven-metadata-local.xml

@dongjoon-hyun

dongjoon-hyun commented Jan 10, 2023

Copy link
Copy Markdown
MemberAuthor

Could you review this, @ndimiduk , @huaxiangsun ?

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec5m 20sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 5smaster passed
+1 💚compile5m 55smaster passed
+1 💚spotless0m 59sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall5m 20sthe patch passed
+1 💚compile5m 53sthe patch passed
+1 💚javac5m 53sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 2sThe patch has no ill-formed XML file.
+1 💚hadoopcheck19m 57sPatch does not cause any errors with Hadoop 3.2.4 3.3.4.
-1 ❌spotless0m 13spatch has 22 errors when running spotless:check, run spotless:apply to fix.
_ Other Tests _
+1 💚asflicense0m 20sThe patch does not generate ASF License warnings.
59m 47s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4953
Optional Testsdupname asflicense javac hadoopcheck spotless xml compile
unameLinux d4c7d0da981e 5.4.0-1088-aws #96~18.04.1-Ubuntu SMP Mon Oct 17 02:57:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 3f1087f
Default JavaEclipse Adoptium-11.0.17+8
spotlesshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/artifact/yetus-general-check/output/patch-spotless.txt
Max. process+thread count81 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Please run mvn spotless:apply to fix the format error?

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 23sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 56smaster passed
+1 💚compile2m 20smaster passed
+1 💚shadedjars4m 34sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 39smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 57sthe patch passed
+1 💚compile2m 14sthe patch passed
+1 💚javac2m 14sthe patch passed
+1 💚shadedjars7m 4spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc3m 17sthe patch passed
_ Other Tests _
-1 ❌unit322m 19sroot in the patch failed.
358m 43s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4953
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 3087f985030f 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 3f1087f
Default JavaEclipse Adoptium-11.0.17+8
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/testReport/
Max. process+thread count2434 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec5m 14sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 37smaster passed
+1 💚compile2m 3smaster passed
+1 💚shadedjars4m 54sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 1smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 16sthe patch passed
+1 💚compile2m 12sthe patch passed
+1 💚javac2m 12sthe patch passed
+1 💚shadedjars5m 27spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 38sthe patch passed
_ Other Tests _
+1 💚unit388m 9sroot in the patch passed.
426m 2s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4953
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 9df1f3b4c312 5.4.0-1088-aws #96~18.04.1-Ubuntu SMP Mon Oct 17 02:57:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 3f1087f
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/testReport/
Max. process+thread count4761 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Thank you, @Apache9 . I did mvn spotless:apply and applied it now.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 54sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 19smaster passed
+1 💚compile6m 7smaster passed
+1 💚spotless0m 50sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall5m 49sthe patch passed
+1 💚compile6m 12sthe patch passed
+1 💚javac6m 12sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 1sThe patch has no ill-formed XML file.
+1 💚hadoopcheck19m 58sPatch does not cause any errors with Hadoop 3.2.4 3.3.4.
+1 💚spotless1m 5spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 19sThe patch does not generate ASF License warnings.
57m 19s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4953
Optional Testsdupname asflicense javac hadoopcheck spotless xml compile
unameLinux 0fc75f598802 5.4.0-1088-aws #96~18.04.1-Ubuntu SMP Mon Oct 17 02:57:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4add525
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count82 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk

Copy link
Copy Markdown
Member

FYI @dongjoon-hyun most of HBase's dependencies are masked behind the hbase-thirdparty libraries. For full utility, I suspect that we'll need that project to also publish sbom.

@ndimiduk

Copy link
Copy Markdown
Member

Okay this is a problem.

[WARNING] The following plugins are not marked as thread-safe in Apache HBase:
[WARNING] org.cyclonedx:cyclonedx-maven-plugin:2.7.3
[WARNING] [WARNING] Enable debug to see precisely which goals are not marked as thread-safe.

Is there a newer version of this plugin that supports multi-threaded builds?

@ndimiduk

ndimiduk commented Jan 10, 2023

Copy link
Copy Markdown
Member

Looks like not yet, CycloneDX/cyclonedx-maven-plugin#77

@ndimiduk

Copy link
Copy Markdown
Member

Have you explored the Apache release process for the resulting artifacts. Does the release manager need to do anything special with the attached artifacts in order to publish them properly?

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 19smaster passed
+1 💚compile2m 20smaster passed
+1 💚shadedjars4m 30sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 12smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 1sthe patch passed
+1 💚compile2m 14sthe patch passed
+1 💚javac2m 14sthe patch passed
+1 💚shadedjars5m 6spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 24sthe patch passed
_ Other Tests _
+1 💚unit311m 10sroot in the patch passed.
343m 50s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4953
Optional Testsjavac javadoc unit shadedjars compile
unameLinux c44657c7ea78 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4add525
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/testReport/
Max. process+thread count4866 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@dongjoon-hyun

dongjoon-hyun commented Jan 10, 2023

Copy link
Copy Markdown
MemberAuthor

Thank you for review, @ndimiduk . This activity focuses on publishing SBOMs of the Maven Central jars.
So, the SBOMs are also published into Maven Central as an immutable files and signed by the ASF signer in the same way with jars. FYI, here is Apache ORC 1.8.2 RC1 vote artifact which is I'm leading now, @ndimiduk .

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 14sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 32smaster passed
+1 💚compile2m 16smaster passed
+1 💚shadedjars4m 49sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 20smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 21sthe patch passed
+1 💚compile2m 5sthe patch passed
+1 💚javac2m 5sthe patch passed
+1 💚shadedjars5m 32spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 40sthe patch passed
_ Other Tests _
+1 💚unit397m 42sroot in the patch passed.
431m 39s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4953
Optional Testsjavac javadoc unit shadedjars compile
unameLinux b9a038f125a0 5.4.0-1088-aws #96~18.04.1-Ubuntu SMP Mon Oct 17 02:57:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4add525
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/testReport/
Max. process+thread count4788 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4953/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Have you explored the Apache release process for the resulting artifacts. Does the release manager need to do anything special with the attached artifacts in order to publish them properly?

Let me test locally.

@Apache9

Copy link
Copy Markdown
Contributor

This is what I've gotten in the local staging dir by running command

mvn clean deploy -DskipTests -Dcheckstyle.skip=true -DaltStagingDirectory=/home/zhangduo/sbom-staged -P apache-release,release -DskipRemoteStaging

zhangduo@zhangduo-VirtualBox:~/sbom-staged/deferred/org/apache/hbase/hbase-client/3.0.0-alpha-4-SNAPSHOT$ ll -h hbase-client-3.0.0-alpha-4-SNAPSHOT-cyclonedx.*
-rw-rw-r-- 1 zhangduo zhangduo 229K 1月 18 21:53 hbase-client-3.0.0-alpha-4-SNAPSHOT-cyclonedx.json
-rw-rw-r-- 1 zhangduo zhangduo 833 1月 18 21:53 hbase-client-3.0.0-alpha-4-SNAPSHOT-cyclonedx.json.asc
-rw-rw-r-- 1 zhangduo zhangduo 196K 1月 18 21:53 hbase-client-3.0.0-alpha-4-SNAPSHOT-cyclonedx.xml
-rw-rw-r-- 1 zhangduo zhangduo 833 1月 18 21:53 hbase-client-3.0.0-alpha-4-SNAPSHOT-cyclonedx.xml.asc

Seems fine, we will publish the sbom files along with other files, no more works needed.

And as @ndimiduk have already pointed out, for hbase-thirdparty there is a problem that, we shade and relocate other libraries so we will miss the information when others depend on hbase-thirdparty. But anyway, I think this can be improved later.

@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Thank you so much, @Apache9!

@Apache9

Copy link
Copy Markdown
Contributor

Going to merge this later unless objections.

Thanks.

@Apache9
Apache9 merged commit 5feb06b into apache:masterJan 20, 2023
Apache9 pushed a commit that referenced this pull request Jan 20, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 5feb06b)
Apache9 pushed a commit that referenced this pull request Jan 20, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 5feb06b)
Apache9 pushed a commit that referenced this pull request Jan 20, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 5feb06b)
@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Thank you all!

vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 5feb06b)
(cherry picked from commit 67a30f3)
Change-Id: I164dea1e48ad1ec524f867547d454d4555984549
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dongjoon-hyun@Apache-HBase@Apache9@ndimiduk