Skip to content

Commit b6404e0

Browse files
author
Wolfram Lutz
committed
Updated maven-dependency-check-plugin to current version 5.1.0 and failing at a cvss score above 8.9 (h2 should be updated). The dependency-check can be performed using 'mvn dependency-check:check' and is integrated into 'mvn site'.
1 parent ad30248 commit b6404e0

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

pom.xml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3737
<maven.compiler.source>1.8</maven.compiler.source>
3838
<maven.compiler.target>1.8</maven.compiler.target>
39+
40+
<maven-dependency-check.version>5.1.0</maven-dependency-check.version>
41+
<!-- USING HTML,XML (comma-separated list) did not work with plugin version 5.1.0 -->
42+
<maven-dependency-check.format>ALL</maven-dependency-check.format>
43+
<maven-dependency-check.failOnError>true</maven-dependency-check.failOnError>
44+
<!-- 11 is the default -->
45+
<maven-dependency-check.failBuildOnCVSS>8.9</maven-dependency-check.failBuildOnCVSS>
3946
</properties>
4047

4148
<dependencies>
@@ -112,6 +119,29 @@
112119
</execution>
113120
</executions>
114121
</plugin>
122+
123+
<!-- see https://jeremylong.github.io/DependencyCheck/summary.html -->
124+
<!-- https://mvnrepository.com/artifact/org.owasp/dependency-check-maven -->
125+
<plugin>
126+
<groupId>org.owasp</groupId>
127+
<artifactId>dependency-check-maven</artifactId>
128+
<version>${maven-dependency-check.version}</version>
129+
<configuration>
130+
<format>${maven-dependency-check.format}</format>
131+
<failOnError>${maven-dependency-check.failOnError}</failOnError>
132+
<failBuildOnCVSS>${maven-dependency-check.failBuildOnCVSS}</failBuildOnCVSS>
133+
<outputDirectory>target/site</outputDirectory>
134+
<!--suppressionFile>${project.basedir}/dependency-check-report_suppressions.xml</suppressionFile-->
135+
</configuration>
136+
<executions>
137+
<execution>
138+
<goals>
139+
<goal>check</goal>
140+
</goals>
141+
</execution>
142+
</executions>
143+
</plugin>
144+
115145
</plugins>
116146
</build>
117147

@@ -125,9 +155,10 @@
125155
</plugin>
126156

127157
<plugin>
158+
<!-- https://mvnrepository.com/artifact/org.owasp/dependency-check-maven -->
128159
<groupId>org.owasp</groupId>
129160
<artifactId>dependency-check-maven</artifactId>
130-
<version>5.0.0-M2</version>
161+
<version>${maven-dependency-check.version}</version>
131162
<reportSets>
132163
<reportSet>
133164
<reports>
@@ -136,9 +167,11 @@
136167
</reportSet>
137168
</reportSets>
138169
<configuration>
139-
<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
140-
<failBuildOnCVSS>8</failBuildOnCVSS>
141-
<!-- <suppressionFile>dependency-check-report_suppressions.xml</suppressionFile> -->
170+
<format>${maven-dependency-check.format}</format>
171+
<failOnError>${maven-dependency-check.failOnError}</failOnError>
172+
<failBuildOnCVSS>${maven-dependency-check.failBuildOnCVSS}</failBuildOnCVSS>
173+
<outputDirectory>target/site</outputDirectory>
174+
<!--suppressionFile>${project.basedir}/dependency-check-report_suppressions.xml</suppressionFile-->
142175
</configuration>
143176
</plugin>
144177
</plugins>

0 commit comments

Comments
 (0)