You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sbom-github.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# Adding SBOMs to your GitHub Releases with Jreleaser
1
+
# Adding SBOMs to your GitHub and Maven Central Releases with Jreleaser
2
2
3
3
## Motivation
4
4
Software Bill of Materials (SBOMs) are critical to modern software development and supply chain management.
5
5
An SBOM is a complete inventory of all the components and dependencies of a software product.
6
6
It provides a detailed list of all the open-source and third-party components used in a software product, their versions and any known vulnerabilities.
7
7
SBOMs are essential for ensuring the security and integrity of software products, as they enable developers and security teams to identify and remediate vulnerabilities in a timely manner.
8
-
In this blog post, we will discuss how to add SBOMs to your GitHub releases and JReleaser, and why it is essential.
8
+
In this blog post, we will discuss how to add SBOMs to your GitHub and Maven Central releases and JReleaser, and why it is essential.
9
9
10
10
## Requirements
11
11
@@ -15,8 +15,8 @@ Here we show how to do it with maven and cyclonedx-maven-plugin.
15
15
16
16
## Goal
17
17
18
-
This blog post provides a step-by-step guide on adding SBOMs to your GitHub releases using Maven and JReleaser.
19
-
We will cover the requirements for adding SBOMs, the benefits of doing so, and the steps involved in generating and adding an SBOM to your GitHub release.
18
+
This blog post provides a step-by-step guide on adding SBOMs to your GitHub and Maven Central releases using Maven and JReleaser.
19
+
We will cover the requirements for adding SBOMs, the benefits of doing so, and the steps involved in generating and adding an SBOM to your GitHub and Maven Central release.
20
20
By the end of this post, you will clearly understand how to add SBOMs to your software releases and why it is crucial to do so.
21
21
22
22
## Steps
@@ -45,8 +45,8 @@ By the end of this post, you will clearly understand how to add SBOMs to your so
45
45
46
46
This will generate a bom.xml file in the target directory. We use the `makeAggregateBom` goal to have a single sbom for all the modules of our project.
47
47
48
-
2. Add the bom.xml and bom.json to your release script.
49
-
If you have the JReleaser YAML file, you can add the bom.xml to the files section of the release section.
48
+
2.(GitHub) Add the bom.xml and bom.json to your release script.
49
+
If you have the JReleaser YAML file, you can add the bom.xml to the files section of the release section. This only affects the GitHub release.
50
50
51
51
```yaml
52
52
files:
@@ -58,9 +58,23 @@ By the end of this post, you will clearly understand how to add SBOMs to your so
58
58
59
59
This adds the bom.xml and bom.json to the release assets.
60
60
61
-
3. Make a release :)
62
-
The final result looks like this: https://github.com/chains-project/maven-lockfile/releases/tag/v3.0.0
61
+
3. (Maven Central) JReleaser automatically uploads the SBOMs to Maven Central from version 1.6.0, if there is file matching the SBOM file name convention.
62
+
Warning: If using the `jreleaser/release-action` action, be aware that even if you use the latest version of the action it can pull different versions of JReleaser, it must be >= 1.6.0.
63
+
See example from `maven-lockfile` release action:
63
64
64
-
## Conclusion
65
-
In conclusion, adding SBOMs to your GitHub releases is a simple and effective way to improve the security and integrity of your software products. Following the steps outlined in this blog post, you can easily generate and add an SBOM to your GitHub release using Maven and JReleaser. With an SBOM, you can identify and remediate vulnerabilities in your software products on time, reducing the risk of security breaches and ensuring the trust of your users. We hope this post has helped guide you through adding SBOMs to your GitHub releases, and we encourage you to continue exploring ways to improve the security and quality of your software products.
The final result looks like this on GitHub: https://github.com/chains-project/maven-lockfile/releases/tag/v5.3.5 and like this on Maven Central: https://repo1.maven.org/maven2/io/github/chains-project/maven-lockfile/5.3.5/.
78
+
79
+
## Conclusion
80
+
In conclusion, adding SBOMs to your GitHub and Maven Central releases is a simple and effective way to improve the security and integrity of your software products. Following the steps outlined in this blog post, you can easily generate and add an SBOM to your GitHub and Maven Central release using Maven and JReleaser. With an SBOM, you can identify and remediate vulnerabilities in your software products on time, reducing the risk of security breaches and ensuring the trust of your users. We hope this post has helped guide you through adding SBOMs to your GitHub and Maven Central releases, and we encourage you to continue exploring ways to improve the security and quality of your software products.
0 commit comments