Skip to content

Commit 41ca700

Browse files
committed
TECH-1662: Add cyclonedx plugins for SBOM creation
1 parent d9bf219 commit 41ca700

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

.github/workflows/on-merge.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ jobs:
4343
nexus_username: ${{ secrets.NEXUS_USERNAME }}
4444
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
4545

46-
# sbom:
47-
# name: SBOM processing
48-
# needs: build
49-
# runs-on: ubuntu-latest
50-
# container:
51-
# image: cyclonedx/cyclonedx-cli:0.24.2
52-
# steps:
53-
# - uses: jahia/jahia-modules-action/sbom-processing@v2
54-
# with:
55-
# dependencytrack_hostname: ${{ vars.DEPENDENCYTRACK_HOSTNAME }}
56-
# dependencytrack_apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
57-
# sbom_artifacts: 'build-artifacts'
46+
sbom:
47+
name: SBOM processing
48+
needs: build
49+
runs-on: ubuntu-latest
50+
container:
51+
image: cyclonedx/cyclonedx-cli:0.24.2
52+
steps:
53+
- uses: jahia/jahia-modules-action/sbom-processing@v2
54+
with:
55+
dependencytrack_hostname: ${{ vars.DEPENDENCYTRACK_HOSTNAME }}
56+
dependencytrack_apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
57+
sbom_artifacts: 'build-artifacts'
5858

5959
integration-tests:
6060
name: Integration Tests

.github/workflows/schedule-sonar.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ jobs:
4040
github_pr_id: ${{github.event.number}}
4141
sonar_url: ${{ secrets.SONAR_URL }}
4242
sonar_token: ${{ secrets.SONAR_TOKEN }}
43+
nvd_apikey: ${{ secrets.NVD_APIKEY }}
4344
mvn_settings_filepath: '.github/maven.settings.xml'

pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,33 @@
110110
</instructions>
111111
</configuration>
112112
</plugin>
113+
<plugin>
114+
<groupId>org.cyclonedx</groupId>
115+
<artifactId>cyclonedx-maven-plugin</artifactId>
116+
<version>2.7.11</version>
117+
<executions>
118+
<execution>
119+
<phase>package</phase>
120+
<goals>
121+
<goal>makeAggregateBom</goal>
122+
</goals>
123+
</execution>
124+
</executions>
125+
<configuration>
126+
<projectType>library</projectType>
127+
<schemaVersion>1.4</schemaVersion>
128+
<includeBomSerialNumber>true</includeBomSerialNumber>
129+
<includeCompileScope>true</includeCompileScope>
130+
<includeProvidedScope>false</includeProvidedScope>
131+
<includeRuntimeScope>true</includeRuntimeScope>
132+
<includeSystemScope>false</includeSystemScope>
133+
<includeTestScope>false</includeTestScope>
134+
<includeLicenseText>false</includeLicenseText>
135+
<outputReactorProjects>true</outputReactorProjects>
136+
<outputFormat>json</outputFormat>
137+
<outputName>java-bom.cdx</outputName>
138+
</configuration>
139+
</plugin>
113140
</plugins>
114141
</build>
115142
</project>

0 commit comments

Comments
 (0)