-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41893][BUILD] Publish SBOM artifacts #39401
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
Conversation
|
cc @srowen and @HyukjinKwon |
|
Ah, it seems that I missed some failures. I convert this as |
|
The PR is ready for review now. Could you review when you have some time? |
|
Seems fine to me. I'm not sure if the maven release plugin will also push this to Maven Central, but maybe that's not essential. Do the files look plausible, like they appear to contain the transitive dependencies and more or less match what's in the "deps" files in the repo? |
|
Thank you, @srowen .
|
viirya
left a comment
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.
So it basically generates aggregate of dependencies as xml and json files and attaches into jar files, right?
viirya
left a comment
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.
Based on the context, looks good to me.
|
Looks good but maybe wait for a while for others to chime in if they have some opinions. |
|
Yes, right. Thank you, @viirya .
|
sunchao
left a comment
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.
Looks fine to me too.
|
Thank you, @sunchao |
|
Thank you all. Let me merge this. |
|
We can see the published SBOM tomorrow after tomorrow's snapshot publishing. |
|
Thanks @dongjoon-hyun ! |
### What changes were proposed in this pull request? Since Apache Spark 3.4.0, Apache Spark main repository has been providing `SBOM` artifact. Like the main repository, this PR aims to publish `SBOM` artifacts of `Apache Spark K8s Operator` artifacts. - apache/spark#39401 - https://repo1.maven.org/maven2/org/apache/spark/spark-core_2.13/4.0.1/spark-core_2.13-4.0.1-cyclonedx.xml ### Why are the changes needed? Here is an article to give some context. - https://www.activestate.com/blog/why-the-us-government-is-mandating-software-bill-of-materials-sbom/ 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](https://cyclonedx.org/), [Software Identification (SWID) tag](https://csrc.nist.gov/projects/Software-Identification-SWID), [Software Package Data Exchange® (SPDX)](https://spdx.dev/). ### Does this PR introduce _any_ user-facing change? No behavior change. ### How was this patch tested? Manually run the following command and check the local Maven directory. **COMMAND** ``` $ gradle publishApachePublicationToMavenLocal -Prelease ``` **BEFORE** ``` $ ls -al ~/.m2/repository/org/apache/spark/spark-operator-api/0.5.0-SNAPSHOT total 976 drwxr-xr-x 15 dongjoon staff 480 Sep 22 16:26 . drwxr-xr-x 4 dongjoon staff 128 Sep 22 16:26 .. -rw-r--r-- 1 dongjoon staff 2632 Sep 22 16:26 maven-metadata-local.xml -rw-r--r-- 1 dongjoon staff 233151 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-javadoc.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-javadoc.jar.asc -rw-r--r-- 1 dongjoon staff 52522 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-sources.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-sources.jar.asc -rw-r--r-- 1 dongjoon staff 17387 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-tests.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT-tests.jar.asc -rw-r--r-- 1 dongjoon staff 154249 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.jar.asc -rw-r--r-- 1 dongjoon staff 2683 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.module -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.module.asc -rw-r--r-- 1 dongjoon staff 2289 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.pom -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:26 spark-operator-api-0.5.0-SNAPSHOT.pom.asc ``` **AFTER** ``` $ ls -al ~/.m2/repository/org/apache/spark/spark-operator-api/0.5.0-SNAPSHOT total 5880 drwxr-xr-x 17 dongjoon staff 544 Sep 22 16:27 . drwxr-xr-x 4 dongjoon staff 128 Sep 22 16:27 .. -rw-r--r-- 1 dongjoon staff 3050 Sep 22 16:27 maven-metadata-local.xml -rw-r--r-- 1 dongjoon staff 2505028 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-cyclonedx.xml -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-cyclonedx.xml.asc -rw-r--r-- 1 dongjoon staff 233151 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-javadoc.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-javadoc.jar.asc -rw-r--r-- 1 dongjoon staff 52522 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-sources.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-sources.jar.asc -rw-r--r-- 1 dongjoon staff 17387 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-tests.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT-tests.jar.asc -rw-r--r-- 1 dongjoon staff 154249 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.jar -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.jar.asc -rw-r--r-- 1 dongjoon staff 2683 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.module -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.module.asc -rw-r--r-- 1 dongjoon staff 2289 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.pom -rw-r--r-- 1 dongjoon staff 833 Sep 22 16:27 spark-operator-api-0.5.0-SNAPSHOT.pom.asc ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #332 from dongjoon-hyun/SPARK-53669. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This PR aims to publish
SBOMartifacts.Why are the changes needed?
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).
This PR uses CycloneDX maven plugin, a lightweight software bill of materials (SBOM) standard designed for use in application security contexts and supply chain component analysis.
For example,
spark-tags_2.12-3.4.0-SNAPSHOT-cyclonedx.xmlandspark-tags_2.12-3.4.0-SNAPSHOT-cyclonedx.jsonfiles are attached tospark-tags_2.12-3.4.0-SNAPSHOT.jar.Does this PR introduce any user-facing change?
Yes, but dev-only changes.
How was this patch tested?
Manually test.