<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>GoTestWaf report</title>
    <script src="https://go-echarts.github.io/go-echarts-assets/assets/echarts.min.js"></script>
    <link href="https://iosevka-webfonts.github.io/iosevka/iosevka.css" rel="stylesheet" />
    <style>
        /*vars*/
        :root {
            /*colors tokens*/
            --black: #000000;
            --white: #FFFFFF;
            --grey: #FAFAFB;
            --blue: #3942EA;
            --green: #56CC54;
            --yellow: #FDBE10;
            --orange: #FC7303;
            --orange-red: #F26344;
            --red: #F24444;
            --light-blue: #DEE0FC;
            --light-green: #E1F9D9;
            --light-yellow: #FEF2B9;
            --light-orange: #FEE1B4;
            --light-orange-red: #f8e6df;
            --light-red: #f8d2c4;
            --dark-grey: #ECECEC;

            /*border-radius tokens*/
            --br-small: 4px;
            --br-medium: 8px;
        }

        /*normalize*/
        *, *::before, *::after {
            box-sizing: border-box;
        }
        * {
            margin: 0;
        }
        html, body {
            height: 100%;
        }
        body {
            font-family: Inter, sans-serif;
            font-style: normal;
            font-size: 10px;
            line-height: 1.5;
            isolation: isolate;
            -webkit-font-smoothing: antialiased;
        }
        img, picture, video, canvas, svg {
            display: block;
            max-width: 100%;
        }
        input, button, textarea, select {
            font: inherit;
        }
        p, h1, h2, h3, h4, h5, h6 {
            overflow-wrap: break-word;
        }

        /*styles*/
        .container {
            width: 800px;
            padding: 40px;
            min-height: 100%;
            margin: 0 auto;
            color: var(--black);
        }
        .mono {
            font-family: Iosevka Web, monospace;
            font-style: normal;
        }
        .title {
            font-size: 24px;
            font-weight: 900;
        }

        .sub-title, .detail__title {
            font-size: 20px;
            font-weight: 700;
        }
        .header {
            display: flex;
            align-items: center;
        }
        .header img {
            float: left;
            width: 100px;
            margin-left: 10px;
            margin-right: 20px;
        }
        .about {
            display: flex;
            min-height: 130px;
            margin: 24px 0 16px;
            overflow: hidden;
            border-radius: var(--br-medium);
        }
        .about__grade-a {
            border: 1px solid var(--green);
        }
        .about__grade-b {
            border: 1px solid var(--yellow);
        }
        .about__grade-c {
            border: 1px solid var(--orange);
        }
        .about__grade-d {
            border: 1px solid var(--orange-red);
        }
        .about__grade-f {
            border: 1px solid var(--red);
        }
        .grade {
            flex: 0 0 160px;
            min-height: 100%;
            padding: 12px 16px;
        }
        .about__grade-a .grade {
            background: var(--green);
        }
        .about__grade-b .grade {
            background: var(--yellow);
        }
        .about__grade-c .grade {
            background: var(--orange);
        }
        .about__grade-d .grade {
            background: var(--orange-red);
        }
        .about__grade-f .grade {
            background: var(--red);
        }
        .grade__title {
            font-weight: 700;
            margin-bottom: 12px;
        }
        .grade__info{
            position: relative;
        }
        .grade__info-grade {
            font-weight: 900;
            font-size: 80px;
            line-height: 100%;
        }
        .grade__info-pont {
            position: absolute;
            top: -10px;
            font-weight: 900;
            font-size: 80px;
            line-height: 100%;
        }
        .grade__info-ratio {
            position: absolute;
            bottom: 0;
            right: 0;
            font-size: 12px;
        }
        .desc {
            flex: 1;
            padding: 12px;
        }
        .desc__info-row {
            margin-bottom: 8px;
        }
        .row__name {
            font-weight: 700;
        }
        .row__content {
            font-weight: 400;
        }
        .row__args {
            font-weight: 400;
            word-break: break-all;
            word-wrap: break-word;
        }
        .grid {
            display: grid;
            grid-auto-columns: 1fr;
            grid-auto-rows: 50px 1fr;
            gap: 4px;
        }
        .grid__head, .grid__row, .grid__footer {
            display: grid;
            grid-template-columns: 228px repeat(3, 160px);
            grid-template-rows: 1fr;
            gap: 4px;
        }
        .head__item, .row__item {
            border-radius: var(--br-small);
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px;
            background: var(--grey);
        }
        .row__item--na {
            background: var(--dark-grey);
        }
        .row__item--a {
            background: var(--light-green);
        }
        .row__item--b {
            background: var(--light-yellow);
        }
        .row__item--c {
            background: var(--light-orange);
        }
        .row__item--d {
            background: var(--light-orange-red);
        }
        .row__item--f {
            background: var(--light-red);
        }
        .row__item-grade {
            width: 30px;
            height: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: var(--br-small);
        }
        .row__item-grade--na {
            color: var(--black);
            background: var(--grey);
        }
        .row__item-grade--a {
            color: var(--white);
            background: var(--green);
        }
        .row__item-grade--b {
            color: var(--black);
            background: var(--yellow);
        }
        .row__item-grade--c {
            color: var(--white);
            background: var(--orange);
        }
        .row__item-grade--d {
            color: var(--white);
            background: var(--orange-red);
        }
        .row__item-grade--f {
            color: var(--white);
            background: var(--red);
        }
        .row__item-value  {
            font-size: 12px;
        }
        .grid__footer {
            position: relative;
            margin-top: 4px;
        }
        .grid__footer::before {
            content: '';
            position: absolute;
            z-index: 10;
            top: -4px;
            left: 0;
            width: 100%;
            height: 1px;
            background: var(--black);
        }
        .chart {
            margin: 24px 0;
        }
        .benchmark {
            page-break-after: always;
        }
        .benchmark__text {
            margin: 4px 0 16px;
        }
        .detail {
            margin: 24px 0 0;
        }
        .detail__sub-title {
            margin: 12px 0;
            font-size: 14px;
            font-weight: 700;
        }
        .detail__sub-sub-title {
            margin: 12px 0;
            font-size: 12px;
            font-weight: 700;
        }
        .summary__grid{
            display: grid;
            grid-template-columns: 1fr;
            gap: 4px;
        }
        .summary__grid--head, .summary__grid--row {
            display: grid;
            grid-template-columns: 90px 120px repeat(6, minmax(45px, 100px));
            gap: 4px;
        }
        .summary__grid--row-sum {
            display: grid;
            grid-template-columns: 214px repeat(6, minmax(45px, 100px));
            gap: 4px;
            font-weight: 700;
            margin-bottom: 10px;
        }
        .summary__grid--head-item, .positive__grid--head-item {
            font-weight: 700;
        }
        .positive__grid {
            margin: 12px 0;
            display: grid;
            grid-template-columns: 1fr;
            gap: 4px;
        }
        .positive__grid--head,
        .positive__grid--row {
            display: grid;
            grid-template-columns: 350px repeat(3, minmax(45px, 125px)) 40px;
            gap: 4px;
        }
        .positive__grid--failed--head,
        .positive__grid--failed--row {
            display: grid;
            grid-template-columns: 390px repeat(3, minmax(45px, 125px));
            gap: 4px;
        }
        .positive__grid--additional--information--row {
            display: grid;
            grid-template-columns: 1fr;
            gap: 4px;
        }
        .summary__grid--head-item, .summary__grid--row-item, .positive__grid--head-item, .positive__grid--row-item {
            display: flex;
            align-items: center;
            padding: 4px;
            word-wrap: break-word;
            border-radius: var(--br-small);
            background: var(--grey);
        }
        .positive__grid--row-item-payload {
            display: flex;
            align-items: center;
            padding: 4px;
            word-break: break-all;
            word-wrap: break-word;
            border-radius: var(--br-small);
            background: var(--grey);
        }
    </style>
</head>

<body>
    <main class="container">
        <div class="header">
            <a href="https://wallarm.com/?utm_campaign=gtw_tool&utm_medium=pdf&utm_source=github">
                <img src="https://troll.wallarm.tools/assets/wallarm.logo.svg" alt="Wallarm Logo">
            </a>
            <h1 class="title">GoTestWAF<br>API / Application Security Testing Results</h1>
        </div>
        <div class="about about__grade-{{.Overall.CSSClassSuffix}}">
            <div class="grade">
                <h4 class="grade__title">Overall grade:</h4>
                <div class="grade__info">
                    {{$length := len .Overall.Mark}} {{if eq $length 2}}
                    <span class="grade__info-grade">{{printf "%c" (index .Overall.Mark 0)}}</span>
                    <span class="grade__info-pont">{{printf "%c" (index .Overall.Mark 1)}}</span>
                    {{else}}
                    <span class="grade__info-grade">{{.Overall.Mark}}</span>
                    {{end}}
                    <span class="grade__info-ratio">{{printf "%.1f" .Overall.Percentage}} / 100</span>
                </div>
            </div>
            <div class="desc">
                <div class="desc__info">
                    <div class="desc__info-row">
                        <span class="row__name">Project name</span>
                        :
                        <span class="row__content">{{.WafName}}</span>
                        <br>
                        <span class="row__name">URL</span>
                        :
                        <span class="row__content">{{.Url}}</span>
                        <br>
                        <span class="row__name">Testing Date</span>
                        :
                        <span class="row__content">{{.WafTestingDate}}</span>
                        <br>
                        <span class="row__name">GoTestWAF version</span>
                        :
                        <span class="row__content mono">{{.GtwVersion}}</span>
                        <br>
                        <span class="row__name">Test cases fingerprint</span>
                        :
                        <span class="row__content mono">{{.TestCasesFP}}</span>
                        <br>
                        {{$length := len $.OpenApiFile}}{{if ne $length 0}}
                        <span class="row__name">OpenAPI file</span>
                        :
                        <span class="row__content">{{.OpenApiFile}}</span>
                        <br>
                        {{end}}
                        {{$length := len $.Args}}{{if ne $length 0}}
                        <span class="row__name">Used arguments</span>
                        :
                        <span class="row__args mono">{{StringsJoin .Args " "}}</span>
                        <br>
                        {{end}}
                    </div>
                </div>
                <!--<div class="desc__text">
                    <p>Monetization of gaming was a fresh concept, growing in tandem with larger builds, open worlds, and sequences.Now, the market continues to grow.</p>
                </div>-->
            </div>
        </div>
        <div class="grid">
            <div class="grid__head">
                <div class="head__item">Type</div>
                <div class="head__item">True-positive tests blocked</div>
                <div class="head__item">True-negative tests passed</div>
                <div class="head__item">Grade</div>
            </div>
            <div class="grid__row">
                <div class="row__item">API Security</div>
                <div class="row__item row__item--{{.ApiSec.TruePositiveTestsGrade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.ApiSec.TruePositiveTestsGrade.CSSClassSuffix}}">{{.ApiSec.TruePositiveTestsGrade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .ApiSec.TruePositiveTestsGrade.Percentage}}</div>
                </div>
                <div class="row__item row__item--{{.ApiSec.TrueNegativeTestsGrade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.ApiSec.TrueNegativeTestsGrade.CSSClassSuffix}}">{{.ApiSec.TrueNegativeTestsGrade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .ApiSec.TrueNegativeTestsGrade.Percentage}}</div>
                </div>
                <div class="row__item row__item--{{.ApiSec.Grade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.ApiSec.Grade.CSSClassSuffix}}">{{.ApiSec.Grade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .ApiSec.Grade.Percentage}}</div>
                </div>
            </div>
            <div class="grid__row">
                <div class="row__item">Application Security</div>
                <div class="row__item row__item--{{.AppSec.TruePositiveTestsGrade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.AppSec.TruePositiveTestsGrade.CSSClassSuffix}}">{{.AppSec.TruePositiveTestsGrade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .AppSec.TruePositiveTestsGrade.Percentage}}</div>
                </div>
                <div class="row__item row__item--{{.AppSec.TrueNegativeTestsGrade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.AppSec.TrueNegativeTestsGrade.CSSClassSuffix}}">{{.AppSec.TrueNegativeTestsGrade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .AppSec.TrueNegativeTestsGrade.Percentage}}</div>
                </div>
                <div class="row__item row__item--{{.AppSec.Grade.CSSClassSuffix}}">
                    <div class="row__item-grade row__item-grade--{{.AppSec.Grade.CSSClassSuffix}}">{{.AppSec.Grade.Mark}}</div>
                    <div class="row__item-value">{{printf "%.1f%%" .AppSec.Grade.Percentage}}</div>
                </div>
            </div>
        </div>
        {{if or ($.ApiSecChartData.Chart) ($.AppSecChartData.Chart)}}
        <div class="chart">
            {{if $.ApiSecChartData.Chart}}
            <div id="api_chart" style="width:1fr; height:450px; break-inside: avoid;">
            {{$.ApiSecChartData.Chart}}
            </div>
            {{end}}
            {{if $.AppSecChartData.Chart}}
            <div id="app_chart" style="width:1fr; height:450px; break-inside: avoid;">
            {{$.AppSecChartData.Chart}}
            </div>
            {{end}}
        </div>
        {{end}}
        <div class="benchmark">
            <h2 class="sub-title">Benchmarks against other solutions</h2>
            <!--<p class="benchmark__text">Monetization of gaming was a fresh concept, growing in tandem with larger builds, open worlds, and sequences.Now, the market continues to grow.</p>-->
            <div class="grid">
                <div class="grid__head">
                    <div class="head__item">Type</div>
                    <div class="head__item">API Security</div>
                    <div class="head__item">Application Security</div>
                    <div class="head__item">Overall score</div>
                </div>
                {{range $row := .ComparisonTable}}
                <div class="grid__row">
                    <div class="row__item">{{$row.Name}}</div>
                    <div class="row__item row__item--{{$row.ApiSec.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{$row.ApiSec.CSSClassSuffix}}">{{$row.ApiSec.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" $row.ApiSec.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{$row.AppSec.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{$row.AppSec.CSSClassSuffix}}">{{$row.AppSec.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" $row.AppSec.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{$row.OverallScore.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{$row.OverallScore.CSSClassSuffix}}">{{$row.OverallScore.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" $row.OverallScore.Percentage}}</div>
                    </div>
                </div>
                {{end}}

                <div class="grid__row">
                    <div class="row__item"><a href="https://www.wallarm.com/request-demo">Wallarm</a></div>
                    <div class="row__item row__item--{{.WallarmResult.ApiSec.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.WallarmResult.ApiSec.CSSClassSuffix}}">{{.WallarmResult.ApiSec.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .WallarmResult.ApiSec.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{.WallarmResult.AppSec.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.WallarmResult.AppSec.CSSClassSuffix}}">{{.WallarmResult.AppSec.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .WallarmResult.AppSec.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{.WallarmResult.OverallScore.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.WallarmResult.OverallScore.CSSClassSuffix}}">{{.WallarmResult.OverallScore.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .WallarmResult.OverallScore.Percentage}}</div>
                    </div>
                </div>

                <div class="grid__footer">
                    <div class="row__item">Your project</div>
                    <div class="row__item row__item--{{.ApiSec.Grade.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.ApiSec.Grade.CSSClassSuffix}}">{{.ApiSec.Grade.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .ApiSec.Grade.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{.AppSec.Grade.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.AppSec.Grade.CSSClassSuffix}}">{{.AppSec.Grade.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .AppSec.Grade.Percentage}}</div>
                    </div>
                    <div class="row__item row__item--{{.Overall.CSSClassSuffix}}">
                        <div class="row__item-grade row__item-grade--{{.Overall.CSSClassSuffix}}">{{.Overall.Mark}}</div>
                        <div class="row__item-value">{{printf "%.1f%%" .Overall.Percentage}}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="detail">
            <h2 class="detail__title">Details</h2>
            <h3 class="detail__sub-title">Summary</h3>
            <p>Total requests sent: {{.TotalSent}}</p>
            <p>Number of blocked requests: {{.BlockedRequestsNumber}}</p>
            <p>Number of passed requests: {{.BypassedRequestsNumber}}</p>
            {{if not .IgnoreUnresolved}}
            <p>Number of unresolved requests: {{.UnresolvedRequestsNumber}}</p>
            {{end}}
            <p>Number of failed requests: {{.FailedRequestsNumber}}</p>
            {{$length := len .TruePositiveTests.SummaryTable}}{{if ne $length 0}}
            <h4 class="detail__sub-sub-title">True-positive tests</h4>
            <div class="summary__grid">
                <div class="summary__grid--head">
                    <div class="summary__grid--head-item">Test set</div>
                    <div class="summary__grid--head-item">Test case</div>
                    <div class="summary__grid--head-item">Percentage</div>
                    <div class="summary__grid--head-item">Blocked</div>
                    <div class="summary__grid--head-item">Bypassed</div>
                    {{if not .IgnoreUnresolved}}
                    <div class="summary__grid--head-item">Unresolved</div>
                    {{end}}
                    <div class="summary__grid--head-item">Sent</div>
                    <div class="summary__grid--head-item">Failed</div>
                </div>
                {{range $testSetName, $testSetSum := .TruePositiveTests.SummaryTable}}
                    {{range $row := $testSetSum.TestCases}}
                <div class="summary__grid--row">
                    <div class="summary__grid--row-item">{{$row.TestSet}}</div>
                    <div class="summary__grid--row-item">{{$row.TestCase}}</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" $row.Percentage}}</div>
                    <div class="summary__grid--row-item">{{$row.Blocked}}</div>
                    <div class="summary__grid--row-item">{{$row.Bypassed}}</div>
                    {{if not $.IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{$row.Unresolved}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{$row.Sent}}</div>
                    <div class="summary__grid--row-item">{{$row.Failed}}</div>
                </div>
                    {{end}}
                    {{$length := len $.TruePositiveTests.SummaryTable}}{{if gt $length 1}}
                <div class="summary__grid--row-sum">
                    <div class="summary__grid--row-item">Summary for {{$testSetName}}</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" $testSetSum.Percentage}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Blocked}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Bypassed}}</div>
                    {{if not $.IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{$testSetSum.Unresolved}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{$testSetSum.Sent}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Failed}}</div>
                </div>
                    {{end}}
                {{end}}
                {{$length := len .TruePositiveTests.SummaryTable}}{{if gt $length 1}}
                <div class="summary__grid--row-sum">
                    <div class="summary__grid--row-item">Summary for true-positive tests</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" .TruePositiveTests.Percentage}}</div>
                    <div class="summary__grid--row-item">{{.TruePositiveTests.BlockedRequestsNumber}}</div>
                    <div class="summary__grid--row-item">{{.TruePositiveTests.BypassedRequestsNumber}}</div>
                    {{if not .IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{.TruePositiveTests.UnresolvedRequestsNumber}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{.TruePositiveTests.TotalSent}}</div>
                    <div class="summary__grid--row-item">{{.TruePositiveTests.FailedRequestsNumber}}</div>
                </div>
                {{end}}
            </div>
            {{end}}
            {{$length := len .TrueNegativeTests.SummaryTable}}{{if ne $length 0}}
            <h4 class="detail__sub-sub-title">True-negative tests</h4>
            <div class="summary__grid">
                <div class="summary__grid--head">
                    <div class="summary__grid--head-item">Test set</div>
                    <div class="summary__grid--head-item">Test case</div>
                    <div class="summary__grid--head-item">Percentage</div>
                    <div class="summary__grid--head-item">Blocked</div>
                    <div class="summary__grid--head-item">Bypassed</div>
                    {{if not .IgnoreUnresolved}}
                    <div class="summary__grid--head-item">Unresolved</div>
                    {{end}}
                    <div class="summary__grid--head-item">Sent</div>
                    <div class="summary__grid--head-item">Failed</div>
                </div>
                {{range $testSetName, $testSetSum := .TrueNegativeTests.SummaryTable}}
                    {{range $row := $testSetSum.TestCases}}
                <div class="summary__grid--row">
                    <div class="summary__grid--row-item">{{$row.TestSet}}</div>
                    <div class="summary__grid--row-item">{{$row.TestCase}}</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" $row.Percentage}}</div>
                    <div class="summary__grid--row-item">{{$row.Blocked}}</div>
                    <div class="summary__grid--row-item">{{$row.Bypassed}}</div>
                    {{if not $.IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{$row.Unresolved}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{$row.Sent}}</div>
                    <div class="summary__grid--row-item">{{$row.Failed}}</div>
                </div>
                    {{end}}
                    {{$length := len $.TrueNegativeTests.SummaryTable}}{{if gt $length 1}}
                <div class="summary__grid--row-sum">
                    <div class="summary__grid--row-item">Summary for {{$testSetName}}</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" $testSetSum.Percentage}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Blocked}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Bypassed}}</div>
                    {{if not $.IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{$testSetSum.Unresolved}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{$testSetSum.Sent}}</div>
                    <div class="summary__grid--row-item">{{$testSetSum.Failed}}</div>
                </div>
                    {{end}}
                {{end}}
                {{$length := len .TrueNegativeTests.SummaryTable}}{{if gt $length 1}}
                <div class="summary__grid--row-sum">
                    <div class="summary__grid--row-item">Summary for false-positive tests</div>
                    <div class="summary__grid--row-item">{{printf "%.2f%%" .TrueNegativeTests.Percentage}}</div>
                    <div class="summary__grid--row-item">{{.TrueNegativeTests.BlockedRequestsNumber}}</div>
                    <div class="summary__grid--row-item">{{.TrueNegativeTests.BypassedRequestsNumber}}</div>
                    {{if not .IgnoreUnresolved}}
                    <div class="summary__grid--row-item">{{.TrueNegativeTests.UnresolvedRequestsNumber}}</div>
                    {{end}}
                    <div class="summary__grid--row-item">{{.TrueNegativeTests.TotalSent}}</div>
                    <div class="summary__grid--row-item">{{.TrueNegativeTests.FailedRequestsNumber}}</div>
                </div>
                {{end}}
            </div>
            {{end}}
            {{if $.ScannedPaths}}
            <h3 class="detail__sub-title">Scanned paths</h3>
            <p>{{$length := len $.ScannedPaths}}{{$length}} endpoints were scanned in total.</p>
            <br>
            {{range $row := $.ScannedPaths}}
            <p class="mono">{{$row.Method}} {{$row.Path}}</p>
            {{end}}
            {{end}}
            <h3 class="detail__sub-title">True Negative Tests</h3>
            <p>{{.TrueNegativeTests.BypassedRequestsNumber}} true-negative requests identified as bypassed (test passed, good behavior)</p>
            <p>{{.TrueNegativeTests.BlockedRequestsNumber}} true-negative requests identified as blocked (test failed, bad behavior)</p>
            {{if .IncludePayloads}}
            {{if .TrueNegativeTests.BlockedRequestsNumber}}
            <div class="positive__grid">
                <div class="positive__grid--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                    <div class="positive__grid--head-item">Status</div>
                </div>
                {{range $payload, $codeMap := .TrueNegativeTests.Blocked}}
                    {{range $code, $testDetails := $codeMap}}
                        {{$encoders := MapKeysToString $testDetails.Encoders ", "}}
                        {{$placeholders := MapKeysToString $testDetails.Placeholders ", "}}
                <div class="positive__grid--row">
                    <div class="positive__grid--row-item-payload mono">{{$payload}}</div>
                    <div class="positive__grid--row-item">{{$testDetails.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$encoders}}</div>
                    <div class="positive__grid--row-item">{{$placeholders}}</div>
                    <div class="positive__grid--row-item">{{$code}}</div>
                </div>
                    {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
            {{if .TrueNegativeTests.UnresolvedRequestsNumber}}
            <p>{{.TrueNegativeTests.UnresolvedRequestsNumber}} true positive requests identified as unresolved</p>
            {{if .IncludePayloads}}
            <div class="positive__grid">
                <div class="positive__grid--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                    <div class="positive__grid--head-item">Status</div>
                </div>
                {{range $payload, $codeMap := .TrueNegativeTests.Unresolved}}
                    {{range $code, $testDetails := $codeMap}}
                        {{$encoders := MapKeysToString $testDetails.Encoders ", "}}
                        {{$placeholders := MapKeysToString $testDetails.Placeholders ", "}}
                <div class="positive__grid--row">
                    <div class="positive__grid--row-item-payload mono">{{$payload}}</div>
                    <div class="positive__grid--row-item">{{$testDetails.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$encoders}}</div>
                    <div class="positive__grid--row-item">{{$placeholders}}</div>
                    <div class="positive__grid--row-item">{{$code}}</div>
                </div>
                    {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
            {{if .TrueNegativeTests.FailedRequestsNumber}}
            <p>{{.TrueNegativeTests.FailedRequestsNumber}} true positive requests are failed</p>
            {{if .IncludePayloads}}
            <div class="positive__grid">
                <div class="positive__grid--failed--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                </div>
                {{range $row := .TrueNegativeTests.Failed}}
                <div class="positive__grid--failed--row">
                    <div class="positive__grid--row-item-payload mono">{{$row.Payload}}</div>
                    <div class="positive__grid--row-item">{{$row.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$row.Encoder}}</div>
                    <div class="positive__grid--row-item">{{$row.Placeholder}}</div>
                </div>
                {{$length := len $row.Reason}}{{if ne $length 0}}
                {{$escapedReason := HTMLEscapeSlice $row.Reason}}
                <div class="positive__grid--additional--information--row">
                    <div class="positive__grid--row-item">Reason: {{$reason := StringsJoin $escapedReason "<br>"}}{{script $reason}}</div>
                </div>
                {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
            <h3 class="detail__sub-title">Bypasses in Details</h3>
            <p>{{.TruePositiveTests.BypassedRequestsNumber}} malicious requests have bypassed the security solution</p>
            {{if .IncludePayloads}}
            {{if .TruePositiveTests.BypassedRequestsNumber}}
            <div class="positive__grid">
                <div class="positive__grid--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                    <div class="positive__grid--head-item">Status</div>
                </div>
                {{range $paths, $pathMap := .TruePositiveTests.Bypassed}}
                    {{$length := len $paths}}
                    {{if ne $length 0}}
                        {{$splitPaths := StringsSplit $paths "\n"}}
                        {{$escapedSP := HTMLEscapeSlice $splitPaths}}
                <div class="positive__grid--additional--information--row">
                    <div class="positive__grid--row-item">{{$path := StringsJoin $escapedSP "<br>"}}{{script $path}}</div>
                </div>
                    {{end}}
                    {{range $payload, $codeMap := $pathMap}}
                        {{range $code, $testDetails := $codeMap}}
                            {{$encoders := MapKeysToString $testDetails.Encoders ", "}}
                            {{$placeholders := MapKeysToString $testDetails.Placeholders ", "}}
                <div class="positive__grid--row">
                    <div class="positive__grid--row-item-payload mono">{{$payload}}</div>
                    <div class="positive__grid--row-item">{{$testDetails.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$encoders}}</div>
                    <div class="positive__grid--row-item">{{$placeholders}}</div>
                    <div class="positive__grid--row-item">{{$code}}</div>
                </div>
                        {{end}}
                    {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
            {{if .TruePositiveTests.UnresolvedRequestsNumber}}
            <h3 class="detail__sub-title">Unresolved requests in Details</h3>
            <p>{{.TruePositiveTests.UnresolvedRequestsNumber}} requests identified as blocked and passed or as not-blocked and not-passed</p>
            {{if .IncludePayloads}}
            <div class="positive__grid">
                <div class="positive__grid--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                    <div class="positive__grid--head-item">Status</div>
                </div>
                {{range $payload, $codeMap := .TruePositiveTests.Unresolved}}
                    {{range $code, $testDetails := $codeMap}}
                        {{$encoders := MapKeysToString $testDetails.Encoders ", "}}
                        {{$placeholders := MapKeysToString $testDetails.Placeholders ", "}}
                <div class="positive__grid--row">
                    <div class="positive__grid--row-item-payload mono">{{$payload}}</div>
                    <div class="positive__grid--row-item">{{$testDetails.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$encoders}}</div>
                    <div class="positive__grid--row-item">{{$placeholders}}</div>
                    <div class="positive__grid--row-item">{{$code}}</div>
                </div>
                    {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
            {{if .TruePositiveTests.FailedRequestsNumber}}
            <h3 class="detail__sub-title">Failed requests in Details</h3>
            <p>{{.TruePositiveTests.FailedRequestsNumber}} requests are failed</p>
            {{if .IncludePayloads}}
            <div class="positive__grid">
                <div class="positive__grid--failed--head">
                    <div class="positive__grid--head-item">Payload</div>
                    <div class="positive__grid--head-item">Test case</div>
                    <div class="positive__grid--head-item">Encoder</div>
                    <div class="positive__grid--head-item">Placeholder</div>
                </div>
                {{range $row := .TruePositiveTests.Failed}}
                <div class="positive__grid--failed--row">
                    <div class="positive__grid--row-item-payload mono">{{$row.Payload}}</div>
                    <div class="positive__grid--row-item">{{$row.TestCase}}</div>
                    <div class="positive__grid--row-item">{{$row.Encoder}}</div>
                    <div class="positive__grid--row-item">{{$row.Placeholder}}</div>
                </div>
                {{$length := len $row.Reason}}{{if ne $length 0}}
                {{$escapedReason := HTMLEscapeSlice $row.Reason}}
                <div class="positive__grid--additional--information--row">
                    <div class="positive__grid--row-item">Reason: {{$reason := StringsJoin $escapedReason "<br>"}}{{script $reason}}</div>
                </div>
                {{end}}
                {{end}}
            </div>
            {{end}}
            {{end}}
        </div>
    </main>
</body>
</html>
