mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
updated test case per issue #792
This commit is contained in:
@@ -43,5 +43,25 @@ Copyright (c) 2017 Jeremy Long. All Rights Reserved.
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>2.4.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-kotlin</artifactId>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-ion</artifactId>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-hppc</artifactId>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||
<artifactId>jackson-jaxrs-yaml-provider</artifactId>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -24,7 +24,12 @@ import java.nio.charset.Charset;
|
||||
// Check to see if jackson-dataformat-xml-2.4.5.jar was identified.
|
||||
//TODO change this to xpath and check for CVE-2016-3720
|
||||
String log = FileUtils.readFileToString(new File(basedir, "target/dependency-check-report.xml"), Charset.defaultCharset().name());
|
||||
int count = StringUtils.countMatches(log, "<fileName>jackson-dataformat-xml-2.4.5.jar</fileName>");
|
||||
int count = StringUtils.countMatches(log, "<name>CVE-2016-7051</name>");
|
||||
if (count == 0){
|
||||
System.out.println(String.format("jackson-dataformat-xml was identified %s times, expected 1", count));
|
||||
return false;
|
||||
}
|
||||
count = StringUtils.countMatches(log, "<name>CVE-2016-3720</name>");
|
||||
if (count == 0){
|
||||
System.out.println(String.format("jackson-dataformat-xml was identified %s times, expected 1", count));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user