This guide explains how to use the run metrics token in reports using a query string-like syntax.
Basic Structure
The token uses URL-style parameters separated by & characters. For example:
{Run_Metrics?run=latest&metric=Found,NotFound,New,Reopened,Fixed}This will be replace by a list of run finding counts for a Continuous project run, with the following metrics: Found, Not Found, New, Reopened, Fixed.
This token only applies to Continuous projects. On a pentest project, or a continuous project with no completed run yet, the token renders nothing.
1. Selecting the run (Optional)
Choose which run's counts to show. Defaults to the latest completed run if not set:
run=latest&Or pin a specific run by its number:
run=3&2. Selecting metrics (Optional)
Choose which counts to include, as a comma-separated list. Available values: Found, NotFound, New, Reopened, Fixed.
metric=Found,NotFound,New,Reopened,Fixed&If you leave off all parameters, {Run_Metrics} shows all five metrics for the latest run. If you set any parameter (such as run=), also set metric= — otherwise no metrics will be shown.
Examples
All metrics for the latest run:
{Run_Metrics}Just the Fixed count for the latest run:
{Run_Metrics?run=latest&metric=Fixed}Reopened and Fixed counts for a specific run:
{Run_Metrics?run=3&metric=Reopened,Fixed}HTML Structure and CSS Classes
The Run Metrics token generates a titled list of run finding counts.
Root Container
<div class="run-metrics">Purpose: Top-level container for the run metrics block.
CSS Class: run-metrics
Title
<div class="run-metrics-title">Run Metrics (Run 12)</div>Purpose: Shows the run number the counts belong to.
CSS Class: run-metrics-title
List Structure
<ul class="run-metrics-list">
<li class="run-metric [state-class]">
<span class="run-metric-label">Found</span>: <span class="run-metric-value">8</span>
</li>
</ul>CSS Classes:
run-metrics-list: Base list stylingrun-metric: Base class on every line item, combined with a state class —found,notfound,new,reopened, orfixed(e.g.run-metric found)run-metric-label: The metric name spanrun-metric-value: The count span