Skip to content
Snippets Groups Projects
Commit f5fa5e0e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4833 dependency track

parent 0ae25d75
Branches
Tags
No related merge requests found
...@@ -184,22 +184,21 @@ pipeline { ...@@ -184,22 +184,21 @@ pipeline {
} }
} }
stage ('OWASP Dependency-Check Vulnerabilities') { stage ('Deploy SBOM to DependencyTrack') {
steps { steps {
dependencyCheck additionalArguments: ''' script {
-o "./" IMAGE_TAG = generateImageTag()
-s "./"
-f "ALL" configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
-d /dependency-check-data withCredentials([string(credentialsId: 'dependency-track-api-key', variable: 'API_KEY')]) {
--suppression dependency-check-supressions.xml
--disableKnownExploited dir('vorgang-manager-server') {
--noupdate catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
--disableArchive sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS io.github.pmckeown:dependency-track-maven-plugin:upload-bom -Ddependency-track.apiKey=$API_KEY -Ddependency-track.projectVersion=${IMAGE_TAG} -Ddependency-track.dependencyTrackBaseUrl=https://dependency-track.ozg-sh.de"
--prettyPrint''', odcInstallation: 'dependency-check-owasp' }
}
dependencyCheckPublisher( }
pattern: 'dependency-check-report.xml' }
)
} }
} }
} }
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
<!-- plugin --> <!-- plugin -->
<license-maven-plugin.version>4.1</license-maven-plugin.version> <license-maven-plugin.version>4.1</license-maven-plugin.version>
<ozgcloud-license.version>1.6.0</ozgcloud-license.version> <ozgcloud-license.version>1.6.0</ozgcloud-license.version>
<dependency-track-maven-plugin.version>1.7.0</dependency-track-maven-plugin.version>
<cyclonedx-maven-plugin.version>2.7.11</cyclonedx-maven-plugin.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -229,8 +233,35 @@ ...@@ -229,8 +233,35 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<plugin>
<groupId>io.github.pmckeown</groupId>
<artifactId>dependency-track-maven-plugin</artifactId>
<version>${dependency-track-maven-plugin.version}</version>
<configuration>
<dependencyTrackBaseUrl>https://dependency-track.ozg-sh.de</dependencyTrackBaseUrl>
<failOnError>true</failOnError>
<createProject>true</createProject>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>${cyclonedx-maven-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
<distributionManagement> <distributionManagement>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment