Skip to content

Commit 5628aef

Browse files
refactoring/527_spdx-sbom (#542)
#527: SPDX SBOM. --- Co-authored-by: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com>
1 parent 1bce167 commit 5628aef

26 files changed

Lines changed: 304 additions & 23 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ jobs:
9191
!product/target/openfasttrace-*-sources.jar
9292
if-no-files-found: error
9393

94+
- name: Upload SPDX SBOM
95+
uses: actions/upload-artifact@v7
96+
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java }}
97+
with:
98+
name: openfasttrace-spdx
99+
path: product/target/site/*.spdx3.json
100+
if-no-files-found: error
101+
94102
- name: Run self-trace
95103
run: ./oft-self-trace.sh
96104

.github/workflows/github_release.sh

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ project_version=$(grep "<revision>" "$pom_file" | sed --regexp-extended 's/\s*<r
1313
readonly project_version
1414
echo "Read project version '$project_version' from $pom_file"
1515

16-
# Calculate checksum
1716
readonly artifact_path="$base_dir/product/target/openfasttrace-${project_version}.jar"
18-
echo "Calculate sha256sum for file '$artifact_path'"
19-
file_dir="$(dirname "$artifact_path")"
20-
readonly file_dir
21-
file_name=$(basename "$artifact_path")
22-
readonly file_name
23-
cd "$file_dir"
24-
readonly checksum_file_name="${file_name}.sha256"
25-
sha256sum "$file_name" > "$checksum_file_name"
26-
readonly checksum_file_path="$file_dir/$checksum_file_name"
27-
cd "$base_dir"
17+
readonly sbom_path="$base_dir/product/target/site/org.itsallcode.openfasttrace_openfasttrace-${project_version}.spdx3.json"
18+
19+
calculate_checksum() {
20+
local file_path="$1"
21+
local checksum_file_path="${file_path}.sha256"
22+
readonly file_path checksum_file_path
23+
echo "Calculating SHA-256 checksum for '$file_path'"
24+
(cd "$(dirname "$file_path")" && sha256sum "$(basename "$file_path")") > "$checksum_file_path"
25+
}
26+
27+
calculate_checksum "$artifact_path"
28+
readonly artifact_checksum_path="${artifact_path}.sha256"
29+
calculate_checksum "$sbom_path"
30+
readonly sbom_checksum_path="${sbom_path}.sha256"
2831

2932

3033
# Create GitHub release
@@ -39,8 +42,11 @@ echo "Git tag : $tag"
3942
echo "Title : $title"
4043
echo "Changes file : $changes_file"
4144
echo "Artifact file: $artifact_path"
42-
echo "Checksum file: $checksum_file_path"
45+
echo "Artifact checksum: $artifact_checksum_path"
46+
echo "SBOM file : $sbom_path"
47+
echo "SBOM checksum: $sbom_checksum_path"
4348

44-
release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" "$artifact_path" "$checksum_file_path")
49+
release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" \
50+
"$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path")
4551
readonly release_url
4652
echo "Release URL: $release_url"

SECURITY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ If you discover a potential security issue, please report it privately via [GitH
1515
- **Disclose** the details publicly once a fix is available and users have had time to update.
1616

1717
While we don't offer bug bounties, we'd be happy to publicly acknowledge your contribution in the advisory.
18+
19+
## Software Bill of Materials (SBOM)
20+
21+
Starting with version 4.10.0, each GitHub release includes an SPDX Software Bill of Materials (SBOM) for the OpenFastTrace product JAR and a SHA-256 checksum for the SBOM.

api/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>openfasttrace-api</artifactId>
66
<name>OpenFastTrace API</name>
7+
<description>Public API of OpenFastTrace</description>
78
<parent>
89
<relativePath>../openfasttrace-mc-deployable-parent/pom.xml</relativePath>
910
<groupId>org.itsallcode.openfasttrace</groupId>

core/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>openfasttrace-core</artifactId>
66
<name>OpenFastTrace Core</name>
7+
<description>OpenFastTrace core logic (specification items, linking and base modules for importers, exporters and reporters)</description>
78
<parent>
89
<relativePath>../openfasttrace-mc-deployable-parent/pom.xml</relativePath>
910
<groupId>org.itsallcode.openfasttrace</groupId>

doc/changes/changes_4.10.0.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OpenFastTrace 4.10.0, released 2026-08-??
2+
3+
Code name: Lifecycle Information and SPDX3 SBOM
4+
5+
## Summary
6+
7+
The project lifecycle documentation now describes planned deprecations and removals in OFT 5.0.0, including migration guidance for the SpecObject format and short coverage tags.
8+
9+
Each release now includes an SPDX 3 SBOM for the product JAR and a SHA-256 checksum for the SBOM.
10+
11+
## Feature
12+
13+
* #542: CI and releases now provide an SPDX 3 SBOM.
14+
15+
## Documentation
16+
17+
* #579: Documented planned deprecations and removals.

doc/developer_guide.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,21 @@ This project is configured to produce exactly the same artifacts each time when
237237

238238
The build will use the last Git commit timestamp as timestamp for files in `.jar` archives.
239239

240+
## SBOM
241+
242+
The project generates an [SPDX](https://spdx.dev/) SBOM using the [SPDX Maven Plugin](https://github.com/spdx/spdx-maven-plugin).
243+
244+
The SPDX plugin runs during Maven's `package` phase and creates an SBOM for each Maven module. The product SBOM describes the product and its production dependencies.
245+
246+
Build OFT and create the SBOMs with a single command:
247+
248+
```shell
249+
mvn package
250+
```
251+
252+
> [!IMPORTANT]
253+
> OFT does not include third-party packages in the production JAR. The JRE is provided by the machine on which OFT runs. Therefore, the product SBOM contains only OFT modules. Test dependencies are excluded because they are not relevant to OFT users.
254+
240255
## Creating a Release
241256

242257
**NOTE**: This currently only works for release version numbers, not SNAPSHOT versions.

exporter/common/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>openfasttrace-exporter-common</artifactId>
66
<name>OpenFastTrace Exporters Utils</name>
7+
<description>Common logic for OpenFastTrace exporters</description>
78
<parent>
89
<relativePath>../../openfasttrace-mc-deployable-parent/pom.xml</relativePath>
910
<groupId>org.itsallcode.openfasttrace</groupId>

exporter/specobject/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>openfasttrace-exporter-specobject</artifactId>
66
<name>OpenFastTrace Specobject Exporter</name>
7+
<description>Specobject (ReqM2 exchange format) exporter</description>
78
<parent>
89
<relativePath>../../openfasttrace-mc-deployable-parent/pom.xml</relativePath>
910
<groupId>org.itsallcode.openfasttrace</groupId>

importer/lightweightmarkup/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>openfasttrace-importer-lightweightmarkup</artifactId>
66
<name>OpenFastTrace Lightweight Markup Importer Base</name>
7+
<description>Base module for OpenFastTrace importers based on lightweight markup languages (e.g., Markdown and RST)</description>
78
<parent>
89
<relativePath>../../openfasttrace-mc-deployable-parent/pom.xml</relativePath>
910
<groupId>org.itsallcode.openfasttrace</groupId>

0 commit comments

Comments
 (0)