Notice there is no “Source” section when it was included in the addFindingsDetails section. The vulnerability used for this defect did not have any data for that field, so due to the presentIfNotNull
method it was excluded without issue.
Full Field List
A list of fields have been provided in this section for customizing defect submissions. Keep in mind that not every field is relevant to every vulnerability, use checks such as the presentIfNotNull
method when including them. ThreadFix recommends making a backup of Classic_Description.vm before making any major changes.
Findings
The following fields should be used in the addFindingsDetails macro.
Code Block |
---|
$finding.createdDate
$finding.modifiedDate
$finding.attackRequest
$finding.attackResponse
$finding.attackString
$finding.authenticationRequired
$finding.calculatedFilePath
$finding.calculatedUrlPath
$finding.longDescription
$finding.markedFalsePositive
$finding.nativeId
$finding.rawFinding
$finding.scannedDate
$finding.scannerDetail
$finding.scannerRecommendation
$finding.sourceFileLocation
$finding.urlReference
$finding.scanId
$finding.vulnerability.id
$finding.dependency.componentFilePath
$finding.dependency.componentName
$finding.dependency.cve
$finding.dependency.description
$finding.dependency.refLink
$finding.dependency.source
$finding.dependency.getRefId()
$finding.channelSeverity.name
$finding.channelVulnerability.name
$finding.getChannelNameOrNull() |
Vulnerabilities
Most likely the following fields will be used in the first block of code, in the #foreach( $vulnerability in $vulnerabilities )
loop.
Code Block |
---|
$vulnerability.closeTime
$vulnerability.foundByScanner
$vulnerability.isFalsePositive
$vulnerability.applicationId
$vulnerability.surfaceLocation.parameter
$vulnerability.surfaceLocation.path
$vulnerability.surfaceLocation.getUrl()
$vulnerability.genericSeverity.name
$vulnerability.genericSeverity.customName
$vulnerability.genericVulnerability.name
$vulnerability.genericVulnerability.customText
$vulnerability.genericVulnerability.cweId |
Data Flow Elements
These fields can be used in the addDataFlow macro at the bottom of Classic_Description.vm.
Code Block |
---|
$dataflowElement.sourceFileName
$dataflowElement.lineNumber
$dataflowElement.lineText
$dataflowElement.sequence
$dataflowElement.columnNumber |
To get a link to the ThreadFix page for a vulnerability, use ${baseUrl}$vulnerability.getUri()
.
To get a link to the CWE entry for a vulnerability, use http://cwe.mitre.org/data/definitions/${vulnerability.genericVulnerability.id}.html
Note |
---|
This feature is available only in 2.8.3 and newer. |
ThreadFix has added the Velocity Tool manager which allows Velocity Tools to be added to the velocity-tools.xml file for Velocity Template editing. $display tools has been added and will allow access to the display tools. This addition does not change current functionality, it adds the ability to add to Velocity as needed by the client.
Occasionally users may find HTML tags in Jira defect descriptions from defects created in ThreadFix. The HTML tags are provided to ThreadFix by some of the remote providers and are used solely for formatting. When transferred to Jira these will display as originally exported by the remote provider. Users may now use velocity tools to have access to the $display.stripTags. By adding $display.stripTags($metadata.preamble)
in place of metadata.preamble
in Classic_Description.vm will remove HTML tags from being added into the Jira defect description.