mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-01-11 14:30:50 +01:00
45 lines
2.2 KiB
HTML
45 lines
2.2 KiB
HTML
@(ht: String, idPrefix: String, vuln: Vulnerability)
|
||
@row[T](name: String, render: T => String = {(_:T).toString})(valueOption: Option[T]) = {
|
||
@for(value <- valueOption){
|
||
<tr>
|
||
<th>@name</th>
|
||
<td>@render(value)</td>
|
||
</tr>
|
||
}
|
||
}
|
||
@severityTable(vuln: Vulnerability) = {
|
||
<p>Rating of severity on scale 0–10. The total score depends on following subscores:</p>
|
||
<table class="vuln-details">
|
||
@row("authentication")(vuln.cvss.authenticationr)
|
||
@row("availability impact")(vuln.cvss.availabilityImpact)
|
||
@row("access vector")(vuln.cvss.accessVector)
|
||
@row("integrity impact")(vuln.cvss.integrityImpact)
|
||
@row("access complexity")(vuln.cvss.accessComplexity)
|
||
@row("confidential impact")(vuln.cvss.confidentialImpact)
|
||
@row("total score")(vuln.cvss.score)
|
||
</table>
|
||
}
|
||
@section = @{views.html.genericSection(idPrefix)(ht) _}
|
||
<p class="cvss"><label>CVSS vulnerability score:</label> <span class="explained" title="@severityTable(vuln).toString()" onmouseover="$(this).tooltip({html: true, placement: 'right'}).tooltip('show')">
|
||
@vuln.cvss.score match{
|
||
case None => {<i>unknown</i>}
|
||
case Some(score) => {<b>@score</b>}
|
||
}
|
||
</span></p>
|
||
@*@vuln.cweOption.map{cwe =><p><label>Category:</label> <span class="explained" title="Vulnerability category according to Common Weakness Enumeration" onmouseover="$(this).tooltip({placement: 'right'}).tooltip('show')"><b>@cwe</b></span></p>}*@
|
||
<label>Description:</label> @vuln.description
|
||
@*@section("vuln-sw", "Vulnerable software"){
|
||
<ul id="@idPrefix-details">
|
||
@for(sw <- vuln.vulnerableSoftware){
|
||
<li>@sw.name@if(sw.allPreviousVersion){ and all previous versions}@if(sw.isVersionless){<span class="warning-expandable" title="This identifier does not contain version. It will match <b>any</b> version, which might cause false positives." onmouseover="$(this).tooltip({placement: 'right', html:true}).tooltip('show');"></span>}</li>
|
||
}
|
||
</ul>
|
||
}*@
|
||
@section("references", "References"){
|
||
<ul>
|
||
@for(reference <- vuln.references){
|
||
<li>@secureLink(reference.url){@reference.source: @reference.name}</li>
|
||
}
|
||
</ul>
|
||
}
|