templates.xmlReport.vsl Maven / Gradle / Ivy
#**
This file is part of Dependency-Check.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright (c) 2018 Jeremy Long. All Rights Reserved.
@author Jeremy Long
@version 2.0
*#
$version
#foreach($prop in $properties.getMetaData().entrySet())
$enc.xml($prop.key)
$enc.xml($prop.value)
#end
#if($exceptions)
#macro( writeXmlException $type $ex $depth)
<$type>$enc.xml($ex.toString())
#if($ex.getStackTrace())
#foreach($t in $ex.getStackTrace())
$enc.xml($t.toString())
#end
#end
#if($ex.getCause() && $depth<20)
#set($cause="cause")
#set($currentDepth=$depth+1)
#writeXmlException($cause $ex.getCause() $currentDepth)
#end
$type>
#end
#foreach($ex in $exceptions)
#set($type="exception")
#set($d=0)
#writeXmlException($type $ex $d)
#end
#end
$enc.xml($applicationName)
#if ($groupID)
$enc.xml($groupID)
#end
#if ($artifactID)
$enc.xml($artifactID)
#end
#if ($applicationVersion)
$enc.xml($applicationVersion)
#end
$scanDateXML
This report contains data retrieved from the National Vulnerability Database: https://nvd.nist.gov, NPM Public Advisories: https://www.npmjs.com/advisories, and the RetireJS community.
#foreach($dependency in $dependencies)
$enc.xml($dependency.DisplayFileName)
$enc.xml($dependency.FilePath)
#if(!$dependency.isVirtual())$enc.xml($dependency.Md5sum)#end
#if(!$dependency.isVirtual())$enc.xml($dependency.Sha1sum)#end
#if(!$dependency.isVirtual())$enc.xml($dependency.Sha256sum)#end
#if ($dependency.description)
$enc.xml($dependency.description)
#end
#if ($dependency.license)
$enc.xml($dependency.license)
#end
#if ($dependency.projectReferences.size()>0)
#foreach($ref in $dependency.projectReferences)
$enc.xml($ref)
#end
#end
#if ($dependency.includedBy.size()>0)
#foreach($ref in $dependency.includedBy)
$enc.xml($ref.getReference())
#end
#end
#if ($dependency.getRelatedDependencies().size()>0)
#foreach($related in $dependency.getRelatedDependencies())
$enc.xml($related.DisplayFileName)
$enc.xml($related.FilePath)
#if(!$related.isVirtual())$enc.xml($related.Sha256sum)#end
#if(!$related.isVirtual())$enc.xml($related.Sha1sum)#end
#if(!$related.isVirtual())$enc.xml($related.Md5sum)#end
#if($related.getSoftwareIdentifiers().size()>0)
#foreach($id in $related.getSoftwareIdentifiers())
$enc.xml($id.value)
#if( $id.url )
$enc.xml($id.url)
#end
#if( $id.description )
$enc.xml($id.description)
#end
#if ($id.notes)
$enc.xml($id.notes)
#end
#end
#end
#end
#end
#foreach($evidence in $dependency.getEvidence($VENDOR))
$enc.xml($evidence.getSource())
$enc.xml($evidence.getName())
$enc.xml($evidence.getValue().trim())
#end
#foreach($evidence in $dependency.getEvidence($PRODUCT))
$enc.xml($evidence.getSource())
$enc.xml($evidence.getName())
$enc.xml($evidence.getValue().trim())
#end
#foreach($evidence in $dependency.getEvidence($VERSION))
$enc.xml($evidence.getSource())
$enc.xml($evidence.getName())
$enc.xml($evidence.getValue().trim())
#end
#if($dependency.getSoftwareIdentifiers().size()>0 || $dependency.getVulnerableSoftwareIdentifiers().size()>0 || $dependency.getSuppressedIdentifiers().size()>0)
#foreach($id in $dependency.getSoftwareIdentifiers())
$enc.xml($id.value)
#if( $id.url )
$enc.xml($id.url)
#end
#if( $id.description )
$enc.xml($id.description)
#end
#if ($id.notes)
$enc.xml($id.notes)
#end
#end
#foreach($id in $dependency.getVulnerableSoftwareIdentifiers())
$enc.xml($id.value)
#if( $id.url )
$enc.xml($id.url)
#end
#if($id.description)$enc.xml($id.description)
#end
#if ($id.notes) $enc.xml($id.notes)
#end
#end
#foreach($id in $dependency.getSuppressedIdentifiers())
$enc.xml($id.value)
#if( $id.url )
$enc.xml($id.url)
#end
#if( $id.description )
$enc.xml($id.description)
#end
#if ($id.notes)
$enc.xml($id.notes)
#end
#end
#end
#if($dependency.getVulnerabilities().size()>0 || $dependency.getSuppressedVulnerabilities().size()>0)
#foreach($vuln in $dependency.getVulnerabilities(true))
$enc.xml($vuln.name)
#if($vuln.getKnownExploitedVulnerability())
#if($vuln.getKnownExploitedVulnerability().getVendorProject())
$enc.xml($vuln.getKnownExploitedVulnerability().getVendorProject())
#end
#if($vuln.getKnownExploitedVulnerability().getProduct())
$enc.xml($vuln.getKnownExploitedVulnerability().getProduct())
#end
#if($vuln.getKnownExploitedVulnerability().getVulnerabilityName())
enc.xml($vuln.getKnownExploitedVulnerability().getVulnerabilityName())
#end
#if($vuln.getKnownExploitedVulnerability().getDateAdded())
$enc.xml($vuln.getKnownExploitedVulnerability().getDateAdded())
#end
#if($vuln.getKnownExploitedVulnerability().getShortDescription())
$enc.xml($vuln.getKnownExploitedVulnerability().getShortDescription())
#end
#if($vuln.getKnownExploitedVulnerability().getRequiredAction())
$enc.xml($vuln.getKnownExploitedVulnerability().getRequiredAction())
#end
#if($vuln.getKnownExploitedVulnerability().getDueDate())
$enc.xml($vuln.getKnownExploitedVulnerability().getDueDate())
#end
#if($vuln.getKnownExploitedVulnerability().getNotes())
$enc.xml($vuln.getKnownExploitedVulnerability().getNotes())
#end
#end
#if($vuln.unscoredSeverity)
#if($vuln.unscoredSeverity.equals("0.0"))Unknown#else$enc.xml($vuln.unscoredSeverity)#end
#elseif($vuln.cvssV3 && $vuln.cvssV3.baseSeverity)
$enc.xml($vuln.cvssV3.baseSeverity)
#elseif($vuln.cvssV2 && $vuln.cvssV2.severity)
$enc.xml($vuln.cvssV2.severity)
#end
#if($vuln.cvssV2)
$vuln.cvssV2.score
#if($vuln.cvssV2.accessVector)$enc.xml($vuln.cvssV2.accessVector)#end
#if($vuln.cvssV2.accessComplexity)$enc.xml($vuln.cvssV2.accessComplexity)#end
#if($vuln.cvssV2.authentication)$enc.xml($vuln.cvssV2.authentication)#end
#if($vuln.cvssV2.confidentialityImpact)$enc.xml($vuln.cvssV2.confidentialityImpact)#end
#if($vuln.cvssV2.integrityImpact)$enc.xml($vuln.cvssV2.integrityImpact)#end
#if($vuln.cvssV2.availabilityImpact)$enc.xml($vuln.cvssV2.availabilityImpact)#end
#if($vuln.cvssV2.severity)$enc.xml($vuln.cvssV2.severity)#end
#if($vuln.cvssV2.version)$enc.xml($vuln.cvssV2.version) #end
#if($vuln.cvssV2.exploitabilityScore)$enc.xml($vuln.cvssV2.exploitabilityScore) #end
#if($vuln.cvssV2.impactScore)$enc.xml($vuln.cvssV2.impactScore) #end
#if($vuln.cvssV2.acInsufInfo)$enc.xml($vuln.cvssV2.acInsufInfo) #end
#if($vuln.cvssV2.obtainAllPrivilege)$enc.xml($vuln.cvssV2.obtainAllPrivilege) #end
#if($vuln.cvssV2.obtainUserPrivilege)$enc.xml($vuln.cvssV2.obtainUserPrivilege) #end
#if($vuln.cvssV2.obtainOtherPrivilege)$enc.xml($vuln.cvssV2.obtainOtherPrivilege) #end
#if($vuln.cvssV2.userInteractionRequired)$enc.xml($vuln.cvssV2.userInteractionRequired) #end
#end
#if($vuln.cvssV3)
$vuln.cvssV3.baseScore
#if($vuln.cvssV3.attackVector)$enc.xml($vuln.cvssV3.attackVector)#end
#if($vuln.cvssV3.attackComplexity)$enc.xml($vuln.cvssV3.attackComplexity)#end
#if($vuln.cvssV3.privilegesRequired)$enc.xml($vuln.cvssV3.privilegesRequired)#end
#if($vuln.cvssV3.userInteraction)$enc.xml($vuln.cvssV3.userInteraction)#end
#if($vuln.cvssV3.scope)$enc.xml($vuln.cvssV3.scope)#end
#if($vuln.cvssV3.confidentialityImpact)$enc.xml($vuln.cvssV3.confidentialityImpact)#end
#if($vuln.cvssV3.integrityImpact)$enc.xml($vuln.cvssV3.integrityImpact)#end
#if($vuln.cvssV3.availabilityImpact)$enc.xml($vuln.cvssV3.availabilityImpact)#end
#if($vuln.cvssV3.baseSeverity)$enc.xml($vuln.cvssV3.baseSeverity)#end
#if($vuln.cvssV3.exploitabilityScore)$enc.xml($vuln.cvssV3.exploitabilityScore) #end
#if($vuln.cvssV3.impactScore)$enc.xml($vuln.cvssV3.impactScore) #end
#if($vuln.cvssV3.version)$enc.xml($vuln.cvssV3.version) #end
#end
#if (!$vuln.cwes.isEmpty())
#foreach($cweEntry in $vuln.cwes.entries)
#if($cweEntry)$enc.xml($cweEntry) #end
#end
#end
#if ($vuln.description)$enc.xml($vuln.description)#end
#if ($vuln.notes)
$enc.xml($vuln.notes)
#end
#foreach($ref in $vuln.getReferences())
$enc.xml($ref.source)
#if($ref.url)$enc.xml($ref.url) #end
$enc.xml($ref.name)
#end
#foreach($vs in $vuln.getVulnerableSoftware(true))
$enc.xml($vs.toCpe23FS())
#end
#end
#foreach($vuln in $dependency.getSuppressedVulnerabilities(true))
$enc.xml($vuln.name)
#if($vuln.cvssV2)
$vuln.cvssV2.score
#if($vuln.cvssV2.accessVector)$enc.xml($vuln.cvssV2.accessVector)#end
#if($vuln.cvssV2.accessComplexity)$enc.xml($vuln.cvssV2.accessComplexity)#end
#if($vuln.cvssV2.authentication)$enc.xml($vuln.cvssV2.authentication)#end
#if($vuln.cvssV2.confidentialityImpact)$enc.xml($vuln.cvssV2.confidentialityImpact)#end
#if($vuln.cvssV2.integrityImpact)$enc.xml($vuln.cvssV2.integrityImpact)#end
#if($vuln.cvssV2.availabilityImpact)$enc.xml($vuln.cvssV2.availabilityImpact)#end
#if($vuln.cvssV2.severity)$enc.xml($vuln.cvssV2.severity)#end
#if($vuln.cvssV2.version)$enc.xml($vuln.cvssV2.version) #end
#if($vuln.cvssV2.exploitabilityScore)$enc.xml($vuln.cvssV2.exploitabilityScore) #end
#if($vuln.cvssV2.impactScore)$enc.xml($vuln.cvssV2.impactScore) #end
#if($vuln.cvssV2.acInsufInfo)$enc.xml($vuln.cvssV2.acInsufInfo) #end
#if($vuln.cvssV2.obtainAllPrivilege)$enc.xml($vuln.cvssV2.obtainAllPrivilege) #end
#if($vuln.cvssV2.obtainUserPrivilege)$enc.xml($vuln.cvssV2.obtainUserPrivilege) #end
#if($vuln.cvssV2.obtainOtherPrivilege)$enc.xml($vuln.cvssV2.obtainOtherPrivilege) #end
#if($vuln.cvssV2.userInteractionRequired)$enc.xml($vuln.cvssV2.userInteractionRequired) #end
#end
#if($vuln.cvssV3)
$vuln.cvssV3.baseScore
#if($vuln.cvssV3.attackVector)$enc.xml($vuln.cvssV3.attackVector)#end
#if($vuln.cvssV3.attackComplexity)$enc.xml($vuln.cvssV3.attackComplexity)#end
#if($vuln.cvssV3.privilegesRequired)$enc.xml($vuln.cvssV3.privilegesRequired)#end
#if($vuln.cvssV3.userInteraction)$enc.xml($vuln.cvssV3.userInteraction)#end
#if($vuln.cvssV3.scope)$enc.xml($vuln.cvssV3.scope)#end
#if($vuln.cvssV3.confidentialityImpact)$enc.xml($vuln.cvssV3.confidentialityImpact)#end
#if($vuln.cvssV3.integrityImpact)$enc.xml($vuln.cvssV3.integrityImpact)#end
#if($vuln.cvssV3.availabilityImpact)$enc.xml($vuln.cvssV3.availabilityImpact)#end
#if($vuln.cvssV3.baseSeverity)$enc.xml($vuln.cvssV3.baseSeverity)#end
#if($vuln.cvssV3.exploitabilityScore)$enc.xml($vuln.cvssV3.exploitabilityScore) #end
#if($vuln.cvssV3.impactScore)$enc.xml($vuln.cvssV3.impactScore) #end
#if($vuln.cvssV3.version)$enc.xml($vuln.cvssV3.version) #end
#end
#if (!$vuln.cwes.isEmpty())
#foreach($cweEntry in $vuln.cwes.entries)
#if($cweEntry)$enc.xml($cweEntry) #end
#end
#end
$enc.xml($vuln.description)
#if ($vuln.notes)
$enc.xml($vuln.notes)
#end
#foreach($ref in $vuln.getReferences())
$enc.xml($ref.source)
$enc.xml($ref.url)
$enc.xml($ref.name)
#end
#foreach($vs in $vuln.getVulnerableSoftware(true))
$enc.xml($vs.toCpe23FS())
#end
#end
#end
#end