From e0d5651b7558ee99e18bd3285ee1181e21472baa Mon Sep 17 00:00:00 2001
From: Jeremy Long
Date: Sun, 26 Feb 2017 07:50:35 -0500
Subject: [PATCH] updated to add notes
---
.../main/resources/templates/HtmlReport.vsl | 40 ++++++++++++++-----
.../main/resources/templates/XmlReport.vsl | 22 +++++++++-
2 files changed, 51 insertions(+), 11 deletions(-)
diff --git a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
index 02035e96e..62e7b8b26 100644
--- a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
+++ b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
@@ -812,8 +812,15 @@ Getting Help: suppress
#end
- #if ($id.description)
-
$enc.html($id.description)
+ #if ($id.description || $id.notes)
+
+ #if ($id.description)
+ - Description: $enc.html($id.description)
+ #end
+ #if ($id.notes)
+ - Notes: $enc.xml($id.notes)
+ #end
+
#end
#end
@@ -838,15 +845,18 @@ Getting Help: CVSS Score: $vuln.cvssScore (AV:$enc.html($vuln.cvssAccessVector.substring(0,1))/AC:$enc.html($vuln.cvssAccessComplexity.substring(0,1))/Au:$enc.html($vuln.cvssAuthentication.substring(0,1))/C:$enc.html($vuln.cvssConfidentialityImpact.substring(0,1))/I:$enc.html($vuln.cvssIntegrityImpact.substring(0,1))/A:$enc.html($vuln.cvssAvailabilityImpact.substring(0,1)))
#if ($vuln.cwe)
CWE: $vuln.cwe
+ #end
+ #if ($vuln.notes)
+
Notes: $enc.xml($vuln.notes)
#end
$enc.html($vuln.description)
- #if ($vuln.getReferences().size()>0)
-
- #foreach($ref in $vuln.getReferences(true))
- - $enc.html($ref.source) - $ref.name
- #end
-
+ #if ($vuln.getReferences().size()>0)
+
+ #foreach($ref in $vuln.getReferences(true))
+ - $enc.html($ref.source) - $ref.name
#end
+
+ #end
#if ($vuln.getVulnerableSoftware().size()<2)
@@ -947,8 +957,15 @@ Getting Help: Confidence:$id.confidence
#end
- #if ($id.description)
-
$enc.html($id.description)
+ #if ($id.description || $id.notes)
+
+ #if ($id.description)
+ - Description: $enc.html($id.description)
+ #end
+ #if ($id.notes)
+ - Notes: $enc.xml($id.notes)
+ #end
+
#end
#end
@@ -973,6 +990,9 @@ Getting Help: CVSS Score: $vuln.cvssScore
#if ($vuln.cwe)
CWE: $vuln.cwe
+ #end
+ #if ($vuln.notes)
+
Notes: $enc.xml($vuln.notes)
#end
$enc.html($vuln.description)
#if ($vuln.getReferences().size()>0)
diff --git a/dependency-check-core/src/main/resources/templates/XmlReport.vsl b/dependency-check-core/src/main/resources/templates/XmlReport.vsl
index 859b0b974..143826c57 100644
--- a/dependency-check-core/src/main/resources/templates/XmlReport.vsl
+++ b/dependency-check-core/src/main/resources/templates/XmlReport.vsl
@@ -19,7 +19,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
@version 1.2
*#
-
+
$version
#foreach($prop in $properties.getMetaData().entrySet())
@@ -60,6 +60,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
($id.value)
#if( $id.url )
$enc.xml($id.url)
+#end
+#if ($id.notes)
+ $enc.xml($id.notes)
#end
#end
@@ -101,6 +104,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
#end
#if( $id.description )
$enc.xml($id.description)
+#end
+#if ($id.notes)
+ $enc.xml($id.notes)
#end
#end
@@ -112,6 +118,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
#end
#if( $id.description )
$enc.xml($id.description)
+#end
+#if ($id.notes)
+ $enc.xml($id.notes)
#end
#end
@@ -140,6 +149,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$enc.xml($vuln.cwe)
#end
$enc.xml($vuln.description)
+#if ($vuln.notes)
+ $enc.xml($vuln.notes)
+#end
#foreach($ref in $vuln.getReferences())
@@ -160,6 +172,12 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$enc.xml($vuln.name)
$vuln.cvssScore
+ $enc.xml($vuln.cvssAccessVector)
+ $enc.xml($vuln.cvssAccessComplexity)
+ $enc.xml($vuln.cvssAuthentication)
+ $enc.xml($vuln.cvssConfidentialityImpact)
+ $enc.xml($vuln.cvssIntegrityImpact)
+ $enc.xml($vuln.cvssAvailabilityImpact)
#if ($vuln.cvssScore<4.0)
Low
#elseif ($vuln.cvssScore>=7.0)
@@ -171,7 +189,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$enc.xml($vuln.cwe)
#end
$enc.xml($vuln.description)
+#if ($vuln.notes)
$enc.xml($vuln.notes)
+#end
#foreach($ref in $vuln.getReferences())