Examples of simple and advanced Jinja2 code for reporting
set
block, so this particular use case requires some additional code.
The code uses a namespace to track separate ID values for each severity category. As it loops over each finding, it increments the ID value by one for its severity and creates a finding ID string. The string is the finding’s first tag, the first character of the severity, and the number value (e.g., TAG-C-1
for the first critical finding).
You can customize this example to change the ID string or start ID values at zero instead of one.