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.
codeDescription |
---|
$finding.createdDate
|
| Adds the Created Date of the finding |
$finding.modifiedDate
|
| Adds the Modified Date of the finding |
$finding.attackRequest
|
| Adds the Attack Request of the finding |
$finding.attackResponse
|
| Adds the Attack Response of the finding |
$finding.attackString
|
| Adds the Attack String of the finding |
$finding.authenticationRequired
|
| Adds the Authentication Requirement of the finding |
$finding.calculatedFilePath
|
| Adds the Calculated File Path of the finding |
$finding.calculatedUrlPath
|
| Adds the Calculated URL Path of the finding |
$finding.longDescription
|
| Adds the Long Description of the finding |
$finding.markedFalsePositive
|
| Boolean determining if finding is marked as a false positive. 1 for false positive and 0 for not false positive |
$finding.nativeId
|
| Adds the Native ID of the finding |
$finding.rawFinding
|
| Adds the Raw Finding |
$finding.scannedDate
|
| Adds the finding’s Scanned Date |
$finding.scannerDetail
|
| Adds the finding’s Scanner Details |
$finding.scannerRecommendation
|
| Adds the finding’s Scanner Recommendation |
$finding.sourceFileLocation
|
| Adds the finding’s Source File Location |
$finding.urlReference
|
| Adds the finding’s URL Reference |
$finding.scanId
|
| Adds the finding’s Scan ID |
$finding.vulnerability.
|
id
id
| Adds the finding’s Vulnerability ID |
$finding.dependency.componentFilePath
|
| Adds the finding’s Dependency Component File Path |
$finding.dependency.componentName
|
| Adds the finding’s Dependency Component Name |
$finding.dependency.cve
|
| Adds the finding’s Dependency CVE |
$finding.dependency.description
|
| Adds the finding’s Dependency Description |
$finding.dependency.refLink
|
| Adds the finding’s Dependency RefLink |
$finding.dependency.source
|
| Adds the finding’s Dependency Source |
$finding.dependency.getRefId()
|
| Adds the finding’s Dependency Reference ID |
$finding.channelSeverity.name
|
| Adds the finding’s Channel Severity Name |
$finding.channelVulnerability.name
|
| Adds the finding’s Channel Vulnerability Name |
$finding.getChannelNameOrNull()
| Adds the finding’s Channel Name if it is not Null |
Vulnerabilities
Most likely the following fields will be used in the first block of code, in the #foreach( $vulnerability in
the #foreach( $vulnerability in $vulnerabilities )
loop.
Code Block |
$vulnerability.closeTime
$vulnerability.foundByScanner
$vulnerability.isFalsePositive
$vulnerability.applicationId
$vulnerability.surfaceLocation.parameter
$vulnerability.surfaceLocation.path
$vulnerabilities )
loop.
Value | Description |
---|
$vulnerability.closeTime
| Adds the vulnerability’s Close Time |
$vulnerability.foundByScanner
| Boolean determining if vulnerability was found by a scanner. 1 for true and 0 for false |
$vulnerability.isFalsePositive
| Boolean determining if vulnerability is a false positive. 1 for false positive and 0 for not false positive |
$vulnerability.applicationId
| Adds the vulnerability’s Application ID |
$vulnerability.application.name
| Adds the vulnerability’s Application Name |
$vulnerability.surfaceLocation.parameter
| Adds the vulnerability’s Surface Location Parameter |
$vulnerability.surfaceLocation.path
| Adds the vulnerability’s Surface Location Path |
$vulnerability.surfaceLocation.getUrl()
|
| Adds the vulnerability’s surface location URL |
$vulnerability.genericSeverity.name
|
| Adds the vulnerability’s Generic Severity Name |
$vulnerability.genericSeverity.customName
|
| Adds the vulnerability’s Generic Severity Custom Name |
$vulnerability.genericVulnerability.name
|
| Adds the vulnerability’s Generic Vulnerability Name |
$vulnerability.genericVulnerability
|
.customText
.customText
| Adds the vulnerability’s Generic Vulnerability Custom Text |
$vulnerability.genericVulnerability.cweId
| Adds the vulnerability’s CWE ID |
Data Flow Elements
These fields can be used in the addDataFlow macro at the bottom of Classic_Description.vm.
codeDescription |
---|
$dataflowElement.sourceFileName
|
| Adds the Data Flow Element’s Source File Name |
$dataflowElement.lineNumber
|
| Adds the Data Flow Element’s Line Number |
$dataflowElement.lineText
|
| Adds the Data Flow Element’s Line Text |
$dataflowElement.sequence
|
| Adds the Data Flow Element’s Sequence |
$dataflowElement.columnNumber
| Adds the Data Flow Element’s Column Number |
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.