FINDINGS

A complete reference of the FINDINGS array in custom Word templates

Iterating Over FINDINGS

The easiest way to iterate over findings is via a for-loop. Findings are categorized by criticality. Iterating through findings at this level will resolve to an object that contains the CRITICALITY of the findings in this collection, as well as the findings collection, itself.

{%p for finding in FINDINGS %}

Criticality

The criticality of a finding may be referenced via the CRITICALITY field in the finding's object.

{%p finding.CRITICALITY %}

Findings

The easiest way to iterate over findings of a given CRITICALITY is via a for-loop.

{%p if finding.FINDINGS %}
{%p for find in finding.FINDINGS %}
{%p endif %}

Title

The title of a finding object may be referenced via the title field.

{{ find.title }}

Status

The status of a finding object may be referenced via the status field.

{{ find.status }}

Severity

The severity of a finding object may be referenced via the severity field.

{{ find.severity }}

Description

The description of a finding object may be referenced via the description field.

{{ find.description }}

Exhibits

The easiest way to iterate over exhibits in a finding is via a for-loop. Each exhibit contains caption and path fields.

{%p if find.exhibits %}
{%p for exhibit in find.exhibits %}
{%p if exhibit.caption %}
{{ exhibit.caption }}
{%p endif %}
{%p if exhibit.path %}
{{ exhibit.path }}
{%p endif %}
{%p endfor %}
{%p endif %}

Code Samples

The easiest way to iterate over code_samples in a finding is via a for-loop. Each code sample contains caption and code fields.

{%p if find.code_samples %}
{%p for sample in find.code_samples %}
{%p if sample.caption %}
{{ sample.caption }}
{%p endif %}
{%p if sample.code %}
{{ sample.code }}
{%p endif %}
{%p endfor %}
{%p endif %}

Affected Assets

The easiest way to iterate over affected_assets in a finding is via a for-loop. Each affected asset is a string and therefore contains no additional fields.

{%p if find.affected_assets %}
{%p for asset in find.affected_assets %}
{{ asset }}
{%p endfor %}
{%p endif %}

Recommendations

The easiest way to iterate over recommendations in a finding is via a for-loop. Each recommendation is a string and therefore contains no additional fields.

{%p if find.recommendations %}
{%p for recommendation in find.recommendations %}
{{ recommendation }}
{%p endfor %}
{%p endif %}

References

The easiest way to iterate over references in a finding is via a for-loop. Each reference is a string and therefore contains no additional fields.

{%p if find.references %}
{%p for reference in find.references %}
{{ reference }}
{%p endfor %}
{%p endif %}

Custom Fields

Custom fields are referenced by their key in the fields object. Each custom field contains a label and value that may then be referenced.

{%p if find.fields %}
{%p if find.fields.key %}
{{ find.fields.key.label }}: {{ find.fields.key.value }}
{%p endif %}
{%p endif %}
{%p endif %}

Scores

The scores custom field is a special field that may be included in each finding. Each score object contains general, cvss, and cvss3 objects. The general, cvss, and cvss3 objects each contain label, value, and `calculation fields.

{%p if find.fields %}
{%p if find.fields.scores %}
{%p if find.fields.scores.general %}
{{ find.fields.scores.general.label }}: {{ find.fields.scores.general.value }}
Calculation: {{ find.fields.scores.general.calculation }}
{%p endif %}
{%p endif %}
{%p endif %}