mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 07:14:09 +01:00
improved TOC per issue #138
Former-commit-id: 7cc7ccb9d0dd8257588438220bf61d78caa2bcec
This commit is contained in:
@@ -84,13 +84,14 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
|||||||
$('#modal-text').focus();
|
$('#modal-text').focus();
|
||||||
$('#modal-text').select();
|
$('#modal-text').select();
|
||||||
}
|
}
|
||||||
function toggleDisplay(el, clzName) {
|
function toggleDisplay(el, clzName, all, some) {
|
||||||
$(clzName).toggle();
|
$(clzName).toggle();
|
||||||
if (el.innerHTML == 'Show All') {
|
if (el.innerHTML == all) {
|
||||||
el.innerHTML = 'Showing Vulnerable Dependencies';
|
el.innerHTML = some;
|
||||||
} else {
|
} else {
|
||||||
el.innerHTML = 'Show All';
|
el.innerHTML = all;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -427,15 +428,24 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
|||||||
.indent {
|
.indent {
|
||||||
margin-left:20px;
|
margin-left:20px;
|
||||||
}
|
}
|
||||||
td, th {
|
td{
|
||||||
|
vertical-align:text-top;
|
||||||
padding:6px;
|
padding:6px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
}
|
}
|
||||||
|
th {
|
||||||
|
text-align:left
|
||||||
|
vertical-align:text-top;
|
||||||
|
padding:6px;
|
||||||
|
margin:0px;
|
||||||
|
border-bottom:1px;
|
||||||
|
border-color: black;
|
||||||
|
}
|
||||||
table {
|
table {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
table.lined tr:nth-child(even) {
|
table.lined tr:nth-child(even) {
|
||||||
background-color: #fbfbfb;
|
background-color: #f3f3f3;
|
||||||
}
|
}
|
||||||
.fullwidth {
|
.fullwidth {
|
||||||
width:100%;
|
width:100%;
|
||||||
@@ -448,9 +458,6 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
|||||||
margin-bottom:3px;
|
margin-bottom:3px;
|
||||||
}
|
}
|
||||||
.vulnerable {
|
.vulnerable {
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
.vulnerable li {
|
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
.notvulnerable {
|
.notvulnerable {
|
||||||
@@ -513,7 +520,7 @@ arising out of or in connection with the use of this tool, the analysis performe
|
|||||||
#set($vulnSuppressedCount=$vulnSuppressedCount+$dependency.getSuppressedVulnerabilities().size())
|
#set($vulnSuppressedCount=$vulnSuppressedCount+$dependency.getSuppressedVulnerabilities().size())
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
Scan Information (<a href="#" onclick="toggleDisplay(this, '.scaninfo'); return false;">Showing Vulnerable Dependencies</a>):<br/>
|
Scan Information (<a href="#" title="Click to toggle display" onclick="return toggleDisplay(this, '.scaninfo', 'show all', 'show less'); return false;">show all</a>):<br/>
|
||||||
<ul class="indent">
|
<ul class="indent">
|
||||||
<li><i>dependency-check version</i>: $version</li>
|
<li><i>dependency-check version</i>: $version</li>
|
||||||
<li><i>Report Generated On</i>: $scanDate</li>
|
<li><i>Report Generated On</i>: $scanDate</li>
|
||||||
@@ -526,23 +533,96 @@ arising out of or in connection with the use of this tool, the analysis performe
|
|||||||
<li class="scaninfo hidden"><i>$enc.html($prop.key)</i>: $enc.html($prop.value)</li>
|
<li class="scaninfo hidden"><i>$enc.html($prop.key)</i>: $enc.html($prop.value)</li>
|
||||||
#end
|
#end
|
||||||
</ul><br/>
|
</ul><br/>
|
||||||
Dependency Display: <a href="#" onclick="toggleDisplay(this,'.notvulnerable'); return false;">show all</a><br/><br/>
|
Display: <a href="#" title="Click to toggle display" onclick="return toggleDisplay(this,'.notvulnerable', 'Showing Vulnerable Dependencies', 'Showing All Dependencies'); return false;">Showing Vulnerable Dependencies</a><br/><br/>
|
||||||
<ul class="indent">
|
|
||||||
#set($lnkcnt=0)
|
#set($lnkcnt=0)
|
||||||
|
<table class="lined">
|
||||||
|
<tr style="text-align:left">
|
||||||
|
<th title="The name of the dependency">Dependency</th>
|
||||||
|
<th title="The number of related dependencies"># Related</th>
|
||||||
|
<th title="The Common Platform Enumeration">CPE</th>
|
||||||
|
<th title="The Maven GAV Coordinates">GAV</th>
|
||||||
|
<th title="The highest CVE Impact">CVE Impact</th>
|
||||||
|
<th title="The number of Common Vulnerability and Exposure (CVE) entries">CVE Count</th>
|
||||||
|
<th title="The confidence rating dependency-check has for the identified CPE">CPE Confidence</th>
|
||||||
|
<th title="The count of evidence used to identify the CPE">Evidence Count</th>
|
||||||
|
</tr>
|
||||||
#foreach($dependency in $dependencies)
|
#foreach($dependency in $dependencies)
|
||||||
#set($lnkcnt=$lnkcnt+1)
|
#set($lnkcnt=$lnkcnt+1)
|
||||||
<li class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
|
<tr class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
|
||||||
<a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a>
|
<td><a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a></td>
|
||||||
#if($dependency.getRelatedDependencies().size()>0)
|
<td>$dependency.getRelatedDependencies().size()</td>
|
||||||
<ul>
|
#set($mavenlink="")
|
||||||
#foreach($related in $dependency.getRelatedDependencies())
|
#set($cpeIdCount=0)
|
||||||
<li>$enc.html($related.DisplayFileName)</li>
|
#set($cpeIdConf="")
|
||||||
|
<td>
|
||||||
|
#foreach($id in $dependency.getIdentifiers())
|
||||||
|
#if ($id.type=="maven")
|
||||||
|
#if ($mavenlink=="" || !$mavenlink.url)
|
||||||
|
#set($mavenlink=$id)
|
||||||
#end
|
#end
|
||||||
</ul>
|
#else
|
||||||
|
#if ($cpeIdCount>=1)
|
||||||
|
<br/>
|
||||||
#end
|
#end
|
||||||
</li>
|
#if( $id.url )
|
||||||
|
<a href="$enc.html($id.url)" target="_blank">$enc.html($id.value)</a>
|
||||||
|
#else
|
||||||
|
$enc.html($id.value)
|
||||||
#end
|
#end
|
||||||
</ul>
|
#if ($cpeIdConf == "")
|
||||||
|
#set($cpeIdConf=$id.confidence)
|
||||||
|
#elseif ($cpeIdConf.compareTo($id.confidence)>0)
|
||||||
|
#set($cpeIdConf=$id.confidence)
|
||||||
|
#end
|
||||||
|
#set($cpeIdCount=$cpeIdCount+1)
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
</td>
|
||||||
|
<td>#if( $mavenlink.url )
|
||||||
|
##yes, we are HTML Encoding the href. this is okay. We can't URL encode as we have to trust the analyzer here...
|
||||||
|
<a href="$enc.html($mavenlink.url)" target="_blank">$enc.html($mavenlink.value)</a>
|
||||||
|
#elseif ($mavenlink.value)
|
||||||
|
$enc.html($mavenlink.value)
|
||||||
|
#end</td>
|
||||||
|
#set($cveImpact=-1)
|
||||||
|
#foreach($vuln in $dependency.getVulnerabilities())
|
||||||
|
#if ($cveImpact<$vuln.cvssScore)
|
||||||
|
#set($cveImpact=$vuln.cvssScore)
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
<td>
|
||||||
|
#if ($cveImpact<0)
|
||||||
|
|
||||||
|
#elseif ($cveImpact<4.0)
|
||||||
|
Low
|
||||||
|
#elseif ($cveImpact>=7.0)
|
||||||
|
High
|
||||||
|
#else
|
||||||
|
Medium
|
||||||
|
#end
|
||||||
|
</td>
|
||||||
|
<td>$dependency.getVulnerabilities().size()</td>
|
||||||
|
<td>$cpeIdConf</td>
|
||||||
|
<td>$dependency.getEvidenceForDisplay().size()</td>
|
||||||
|
</tr>
|
||||||
|
#end
|
||||||
|
</table>
|
||||||
|
## <ul class="indent">
|
||||||
|
## #set($lnkcnt=0)
|
||||||
|
## #foreach($dependency in $dependencies)
|
||||||
|
## #set($lnkcnt=$lnkcnt+1)
|
||||||
|
## <li class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
|
||||||
|
## <a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a>
|
||||||
|
## #if($dependency.getRelatedDependencies().size()>0)
|
||||||
|
## <ul>
|
||||||
|
## #foreach($related in $dependency.getRelatedDependencies())
|
||||||
|
## <li>$enc.html($related.DisplayFileName)</li>
|
||||||
|
## #end
|
||||||
|
## </ul>
|
||||||
|
## #end
|
||||||
|
## </li>
|
||||||
|
## #end
|
||||||
|
## </ul>
|
||||||
<h2>Dependencies</h2>
|
<h2>Dependencies</h2>
|
||||||
#set($lnkcnt=0)
|
#set($lnkcnt=0)
|
||||||
#set($cnt=0)
|
#set($cnt=0)
|
||||||
|
|||||||
Reference in New Issue
Block a user