Tags
Under Construction. Thank you for your patience.
To reference Tags in a Jinja document, the basics are as follows:

FINDING TAGS

1
{%p for group in FINDINGS %}
2
{%p for f in group.FINDINGS %}
3
{%p if f.tags %}
4
{%p for tag in f.tags %}
5
{{tag}}
6
{%p endfor %}
7
{%p endif %]
8
{%p endfor %}
9
{%p endfor %}
Copied!

REPORT TAGS

1
{%p if REPORT.tags %}
2
{%p for tag in REPORT.tags %}
3
{{tag}}
4
{%p endfor %}
5
{%p endif %}
Copied!
You can use finding tags to highlight findings, custom order your findings, indicate strengths and weaknesses.

Example Use Case

You'll typically see an if conditional after the "for tag in x" loop to check for a specific tag like below:
1
{%p set ss.scope = "" %} {#Declare namespace variable ousite the loop #}
2
{%p if REPORT.tags %} {# Ensure there are tags #}
3
{%p for tag in REPORT.tags %} {# Loop through each tag #}
4
{%p if "internal" in tag %} {# Check if my scope is "internal" #}
5
{%p set ss.scope = "Internal Network Penetration Test" %}
6
{%p elif "external" in tag %}{# Check if my scope is "external" #}
7
{%p set ss.scope = "External Network Penetration Test" %}
8
{%p endif %}
9
{%p endfor %}
10
{%p endif %}
11
12
{{ss.scope}}
13
equals
14
Internal Network Penetration Test
Copied!
Last modified 3mo ago