Skip to content
Examples

Examples

Practical template snippets you can use in your reports. These show only the LiquidJS expressions — headings, paragraphs, and formatting are done through the visual editor.

Cover page

liquid
{{ report.title }}
{{ client.name }}
{{ dates.startDate | formatDate: 'long' }} — {{ dates.endDate | formatDate: 'long' }}
Version {{ report.version }}

TIP

Insert the client logo using the image element in the visual editor with client.logo as the variable source.

Document control

Use a table element in the visual editor with these variables in the cells:

FieldVariable
Document title{{ report.title }}
Client{{ client.name }}
Author{{ report.author.name }}
Reviewer{{ report.reviewer.name }}
Assessment period`{{ dates.startDate
Report date`{{ dates.currentDate
Version{{ report.version }}

Executive summary

Using a custom variable custom.executive.summary:

liquid
{{ custom.executive.summary }}

During the assessment, a total of {{ stats.totalVulnerabilities }} vulnerabilities were identified:
{{ stats.criticalCount }} Critical, {{ stats.highCount }} High,
{{ stats.mediumCount }} Medium, {{ stats.lowCount }} Low,
and {{ stats.informativeCount }} Informational.

Findings summary table

Use a table element with a row loop on vulnerabilities:

liquid
{{ forloop.index }}
{{ vuln.title }}
{{ vuln.severity }}
{{ vuln.cvss.score | score }}

To sort by severity, use the sort filter on the loop:

liquid
{% for vuln in vulnerabilities | sort_multi: 'severity:Critical|High|Medium|Low|Info' %}

TIP

You can set severity cell background colors dynamically using {{ vuln.severity | severityBackgroundColor }} in the table cell's color setting.

Statistics table

Create a table with severity labels and their counts:

CellVariable
Critical count{{ stats.criticalCount }}
High count{{ stats.highCount }}
Medium count{{ stats.mediumCount }}
Low count{{ stats.lowCount }}
Informational count{{ stats.informativeCount }}
Total{{ stats.totalVulnerabilities }}

Scope

liquid
{{ scope.description }}

Use a table with a row loop on scope.entries:

liquid
{{ entry.type | uppercase }}
{{ entry.name }}
{{ entry.value }}

Vulnerability detail page

Use a loop with page breaks to render each vulnerability on its own page:

liquid
{% for vuln in vulnerabilities %}
  {{ vuln.title }}

  Severity: {{ vuln.severity }}
  CVSS Score: {{ vuln.cvss.score | score }}
  CVSS Vector: {{ vuln.cvss.vector }}

  {{ vuln.description }}

  {% if vuln.impact %}
    {{ vuln.impact }}
  {% endif %}

  {% if vuln.remediation %}
    {{ vuln.remediation }}
  {% endif %}

  {% if vuln.references %}
    {{ vuln.references }}
  {% endif %}

  {% unless forloop.last %}{% pagebreak %}{% endunless %}
{% endfor %}

CVSS breakdown

Use a table to display CVSS metrics:

MetricVariable
Attack Vector{{ cvss.AV | cvssMetric }}
Attack Complexity{{ cvss.AC | cvssMetric }}
Privileges Required{{ cvss.PR | cvssMetric }}
User Interaction{{ cvss.UI | cvssMetric }}
Scope{{ cvss.S | cvssMetric }}
Confidentiality{{ cvss.C | cvssMetric }}
Integrity{{ cvss.I | cvssMetric }}
Availability{{ cvss.A | cvssMetric }}

Conditional sections

liquid
{% if stats.criticalCount > 0 %}
  {{ stats.criticalCount }} critical vulnerabilities identified. Immediate action is recommended.
{% endif %}

Translating values with mapValue

Useful for multilingual reports where field values are in English but the report is in another language:

liquid
{{ vuln.severity | mapValue: 'Critical:Critique,High:Élevé,Medium:Moyen,Low:Faible,Info:Informatif' }}

Custom field colors with mapColor

For dropdown fields in your vulnerability template (e.g. remediation complexity, priority), use mapBgColor in the table cell's color setting:

liquid
{{ vuln.remediationComplexity | mapBgColor: 'Easy:#22c55e,Medium:#eab308,Hard:#ef4444' }}