You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2023/06/12 10:08:18 UTC

[ws-wss4j] branch 2_4_x-fixes updated: Fail build if CVSS score is above 6 (#170)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 2_4_x-fixes
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git


The following commit(s) were added to refs/heads/2_4_x-fixes by this push:
     new 2400bab42 Fail build if CVSS score is above 6 (#170)
2400bab42 is described below

commit 2400bab42fc6fe5c6f16053951faf32f5e174637
Author: Rob Leland <26...@users.noreply.github.com>
AuthorDate: Mon Jun 12 05:33:28 2023 -0400

    Fail build if CVSS score is above 6 (#170)
    
    * Fail build if CVSS score is above 6
    
    Moved plugin execution to existing profile :
    dependencycheck
    
    Config file: build-tools/dependency-check-suppression.xml
    
    * Try to resolve merge issue with project.build.outputTimestamp
    
    Plus remove unnecessary version tags in owasp tool
    
    ---------
    
    Co-authored-by: Rob Leland <rl...@apache.org>
---
 build-tools/dependency-check-suppression.xml | 21 +++++++++++++++++++++
 pom.xml                                      | 25 ++++++++++++++++---------
 2 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/build-tools/dependency-check-suppression.xml b/build-tools/dependency-check-suppression.xml
new file mode 100644
index 000000000..0671e3a05
--- /dev/null
+++ b/build-tools/dependency-check-suppression.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<suppressions
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+        xmlns='https://www.owasp.org/index.php/OWASP_Dependency_Check_Suppression'
+        xsi:schemaLocation='https://www.owasp.org/index.php/OWASP_Dependency_Check_Suppression suppression.xsd'>
+<!--
+    <suppress>
+        <notes><![CDATA[
+        This suppresses a specific cve for any dependency in any directory that has the specified sha1 checksum.
+        ]]></notes>
+        <sha1>384FAA82E193D4E4B0546059CA09572654BC3970</sha1>
+        <cve>CVE-2013-1337</cve>
+    </suppress>
+    <suppress>
+        <notes><![CDATA[
+        This suppresses all CVE entries that have a score below CVSS 5.
+        ]]></notes>
+        <cvssBelow>5</cvssBelow>
+    </suppress>
+-->
+</suppressions>
diff --git a/pom.xml b/pom.xml
index c1455893d..fb3e97dc3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -317,14 +317,6 @@
                     <groupId>org.owasp</groupId>
                     <artifactId>dependency-check-maven</artifactId>
                     <version>${maven-owasp-plugin-version}</version>
-                    <executions>
-                        <execution>
-                            <phase>validate</phase>
-                            <goals>
-                                <goal>check</goal>
-                            </goals>
-                        </execution>
-                    </executions>
                 </plugin>
             </plugins>
         </pluginManagement>
@@ -513,6 +505,22 @@
                     <plugin>
                         <groupId>org.owasp</groupId>
                         <artifactId>dependency-check-maven</artifactId>
+                        <configuration>
+                            <failBuildOnCVSS>6</failBuildOnCVSS>
+                            <skipProvidedScope>true</skipProvidedScope>
+                            <skipRuntimeScope>true</skipRuntimeScope>
+                            <suppressionFiles>
+                                <suppressionFile>${buildtools.dir}/dependency-check-suppression.xml</suppressionFile>
+                            </suppressionFiles>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>validate</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
                     </plugin>
                 </plugins>
             </build>
@@ -550,7 +558,6 @@
             <plugin>
                 <groupId>org.owasp</groupId>
                 <artifactId>dependency-check-maven</artifactId>
-                <version>${maven-owasp-plugin-version}</version>
             </plugin>
         </plugins>
     </reporting>