@import services.SingleLibraryScanResult @(isDbOld: Boolean, singleLibraryScanResult: SingleLibraryScanResult)(implicit header: DefaultRequest, mainTemplateData: MainTemplateData) @import singleLibraryScanResult.{transitiveDependencies, includesTransitive, mainDependencies, limitations, profilesOption} @requiresAttention = @{limitations.exists(_.requiresAttention)} @for((profiles, _) <- profilesOption){

Profiles

@if(profiles.size > 1) {

This scan provider results for multiple profiles. By default, all results all shown, but you can filter it.

@for(profile <- profiles) { }
}else{ All results belong to profile @profiles.head. } }

Overall result

@vulnerableTransitive = @{transitiveDependencies.exists(_.isVulnerable)} @vulnerableMain = @{mainDependencies.exists(_.isVulnerable)} @if(isDbOld){
The vulnerability database seems to be outdated. Result might be thus inaccurate. Contact the administrator, please.
} @for(limitation <- limitations){
Limitation: @limitation.message
} @(vulnerableMain, vulnerableTransitive) match { case (false, false) => {
No vulnerability has been found in the library@if(includesTransitive){ or in its transitive dependencies}. @if(requiresAttention){However, take care of the limitations above, please.}
} case (false, true) => {
While there is no vulnerability found in the library itself, but scan has identified some issues in its transitive dependencies. Maybe you should evict some dependency with a fixed version. @vulnerabilityAdvice()
} case (true, false) => {
There is a vulnerability found in the main dependency. Transitive dependencies are OK. Please consider using a patched version or consider impact of the vulnerabilities. @vulnerabilityAdvice()
} case (true, true) => {
There is a vulnerability found in both the main dependency and transitive dependencies. Please consider using a patched version or consider impact of the vulnerabilities. @vulnerabilityAdvice()
} }

The library itself

@dependencyList("main", mainDependencies, None, expand = _.isVulnerable, addButtons = false, lazyLoad = false, showAffectedProjects = false, expandVulnerabilities = true, vulnerabilitySearch = false, profilesOption = profilesOption) @if(includesTransitive) {

Transitive dependencies

@if(transitiveDependencies.nonEmpty) { @if(vulnerableTransitive){
Those vulnerabilities are primarily sorted by highest-rated known vulnerability. Transitive dependencies without a known vulnerability are at the end of the list.
}else{
There is no known vulnerability in transitive dependencies. They are listed just for your information.
} @dependencyList("transitive", transitiveDependencies.sorted(severityOrdering), None, expand = _.isVulnerable, addButtons = false, lazyLoad = false, showAffectedProjects = false, expandVulnerabilities = true, vulnerabilitySearch = true, profilesOption = profilesOption) }else{ This library has no transitive dependencies. } }