{% load i18n %}

{% with icon_done="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iY2hlY2ttYXJrIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MiA1MiI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYiIHI9IjI1IiBmaWxsPSIjN2FjMTQyIi8+CjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xMSAyNiBsNCAtNCBsOCA4IGwxNSAtMTUgbDQgNCBsLTE5IDE5Ii8+Cjwvc3ZnPg==" icon_not_done="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iY2hlY2ttYXJrIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MiA1MiI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYiIHI9IjI1IiBmaWxsPSIjZjAwIi8+CjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0yMiAyNiBsLTEwIC0xMCBsNCAtNCBsMTAgMTAgbDEwIC0xMCBsNCA0IGwtMTAgMTAgbDEwIDEwIGwtNCA0IGwtMTAgLTEwIGwtMTAgMTAgbC00IC00Ii8+Cjwvc3ZnPg==" edit_icon="data:image/svg+xml,%3Csvg width='19' height='19' viewBox='0 0 19 19' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_19894_54825)'%3E%3Cpath d='M11.5063 5.62578L10.75 4.86953C10.2625 4.38203 9.46875 4.38203 8.98125 4.86953L7.30625 6.54453L1.875 11.9758V14.5008H4.4L9.8625 9.03828L11.5063 7.39453C12 6.90703 12 6.11328 11.5063 5.62578ZM3.88125 13.2508H3.125V12.4945L8.5375 7.08203L9.29375 7.83828L3.88125 13.2508ZM6.875 14.5008L9.375 12.0008H13.125V14.5008H6.875Z' fill='%23171717'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_19894_54825'%3E%3Crect width='15' height='15' fill='white' transform='translate(0 2)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A" analysis_edit_icon="data:image/svg+xml,%3Csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.66671 12.2507V10.4569L11.8896 7.24857C11.9771 7.16107 12.0743 7.09787 12.1813 7.05898C12.2882 7.0201 12.3952 7.00065 12.5021 7.00065C12.6188 7.00065 12.7306 7.02253 12.8375 7.06628C12.9445 7.11003 13.0417 7.17565 13.1292 7.26315L13.6688 7.80273C13.7466 7.89023 13.8073 7.98746 13.8511 8.0944C13.8948 8.20135 13.9167 8.30829 13.9167 8.41523C13.9167 8.52218 13.8973 8.63155 13.8584 8.74336C13.8195 8.85517 13.7563 8.95482 13.6688 9.04232L10.4605 12.2507H8.66671ZM2.83337 11.6673V10.034C2.83337 9.70343 2.91844 9.39961 3.08858 9.12253C3.25872 8.84544 3.48476 8.63398 3.76671 8.48815C4.36949 8.18676 4.98199 7.96072 5.60421 7.81003C6.22643 7.65933 6.85837 7.58398 7.50004 7.58398C7.85976 7.58398 8.21462 7.60586 8.56462 7.64961C8.91462 7.69336 9.26462 7.76385 9.61462 7.86107L7.50004 9.97565V11.6673H2.83337ZM12.5021 8.98398L13.0417 8.41523L12.5021 7.87565L11.948 8.42982L12.5021 8.98398ZM7.50004 7.00065C6.85837 7.00065 6.30907 6.77218 5.85212 6.31523C5.39518 5.85829 5.16671 5.30898 5.16671 4.66732C5.16671 4.02565 5.39518 3.47635 5.85212 3.0194C6.30907 2.56246 6.85837 2.33398 7.50004 2.33398C8.14171 2.33398 8.69101 2.56246 9.14796 3.0194C9.6049 3.47635 9.83337 4.02565 9.83337 4.66732C9.83337 5.30898 9.6049 5.85829 9.14796 6.31523C8.69101 6.77218 8.14171 7.00065 7.50004 7.00065Z' fill='white'/%3E%3C/svg%3E" %}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Appknox Report</title>
  <style>

    /* print settings */
    @page {
      margin: 1.8cm 0.75cm;
      padding: 0.3em 0;
      @top-left {
        content: '{% trans "Confidential" %}';
        margin-left: 0.2cm;
        font-size: 0.85em;
      }
      @top-right {
        content: "{{ report.created_on }} UTC";
        margin-right: 0.2cm;
        font-size: 0.85em;
      }
      @bottom-center {
        border-top: 1px solid #6B6B6B;
        width: 100%;
        content: "Page " counter(page) " of " counter(pages);
        font-size: 0.85em;
      }
    }

    .page {
      page-break-before: always;
    }

    /* report styles */
    *, *::before, *::after {
      box-sizing: border-box;
    }

    html {
      font-family: 'Noto Sans', sans-serif;
      font-size: 0.75em;
      line-height: 1.5;
      color: #6d6e73;
    }

    pre {
      white-space: pre-wrap;
      word-wrap: break-word;
      padding-left: 2em;
    }

    a {
      color: #EF4836;
      text-decoration: none;
    }

    a:hover, a:focus, a:active {
      color: #a3382c;
    }

    ul {
      list-style-type:  square;
    }

    .wrap-content {
      word-wrap: break-word;
    }

    .coverpage__title {
      text-align: center;
      font-size: 2.2em;
      font-weight: 400;
      margin-bottom: 0.3em;
      margin-top: 5.2em;
    }

    .coverpage__tagline {
      text-align: center;
      font-size: 1.1em;
      font-style: italic;
    }

    .coverpage__preparedfor {
      text-align: center;
      height: 15em;
    }

    .preparedfor {
      width: 36em;
      margin: auto;
      height: 100%;
      padding: 6em 0 4em;
    }

    .preparedfor__name {
      font-size: 2.3em;
      margin: auto;
      padding: 1em 0;
    }

    .preparedfor__logo {
      width: 16em;
      height: 10em;
      margin: auto;
    }

    .preparedfor__logo td {
      text-align: center;
    }

    .preparedfor__logo img {
      max-height: 100%;
      max-width: 16em;
    }

    .coverpage__appmeta {
      text-align: center;
    }

    .appmeta {
      margin: auto;
    }

    .appmeta__icon {
      padding-right: 0.8em;
      margin-left: -0.8em;
    }

    .appmeta__icon img {
      width: 4.3em;
    }

    .appmeta__info {
      text-align: left;
    }

    .appmeta__title {
      font-size: 1.5em;
    }

    .appmeta__detail {
      position: relative;
    }

    .appmeta__platform {
      position: absolute;
      top: 0.01em;
      right: -1.5em;
    }

    .coverpage__authors {
      width: 100%;
      margin-top: 14.5em;
    }

    .author {
      width: 50%;
    }

    .author__heading {
      font-size: 0.8em;
      padding-bottom: 1em;
    }

    .author__logo {
      height: 5.5em;
    }

    .author__logo img {
      max-width: 160px;
      max-height: 100%;
      display: inline-block;
    }

    .author--center, .author--center .author__heading, .author--center .author__logo {
      text-align: center;
    }

    .author--center .author__logo img {
      margin: auto;
    }

    .author--left, .author--left .author__heading, .author--left .author__logo {
      text-align: left;
    }

    .author--left .author__logo img {
      margin: auto auto auto 0;
    }

    .author--right, .author--right .author__heading, .author--right .author__logo {
      text-align: right;
    }

    .author--right .author__logo img {
      margin: auto 0 auto auto;
    }

    .pagetitle {
      color: #EF4836;
      border: 1px solid #EF4836;
      font-weight: 400;
      display: inline-block;
      border-radius: 0.2em;
    }

    .pagetitle--main {
      font-size: 1.9em;
      padding: 0.1em 1em 0.2em;
      max-width: 90%;
      min-width: 50%;
    }

    .pagetitle--sub {
      font-size: 1.3em;
      padding: 0.2em 2em 0.3em;
    }

    .pagetitle__container {
      text-align: center;
      margin-bottom: 1em;
      margin-top: 1em;
    }

    .table {
      table-layout: fixed;
      width: 100%;
    }

    .table--bordered {
      border-collapse: collapse;
    }

    .table--bordered th, .table--bordered td {
      border: 1px solid #6d6e73;
    }

    .table--appdetail td {
      padding: 0.8em 1em;
      word-wrap: break-word;
    }

    .table--appdetail tr td:first-child {
      width: 41%;
      font-weight: bold;
    }

    .table--toc td {
      padding: 0.4em 1em;
      font-size: 1.1em;
    }

    .table--toc a, .table--toc a:hover, .table--toc a:active, .table--toc a:focus {
      color: #6d6e73;
      text-decoration: none;
    }

    .toc__heading {
      margin: 0;
    }

    .toc__subheading {
      margin-left: 0.8em;
    }

    .toc__subheading::before {
      content: '-';
      padding: 0 0.5em;
    }

    .table--auditsummary tbody {
      width: 100%;
    }

    .table--auditsummary td {
      padding: 0.8em 1em;
    }

    .auditsummary__score {
      width: 11.5em;
      padding: 0.8em 0 0.8em 1em;
      text-align: center;
    }

    .auditsummary__severity, .analysis__severity {
      min-width: 6.5em;
    }

    .auditsummary__severity.severity {
      width: 100%;
    }

    .auditsummary__cvssscore {
      font-size: 2.167em;
      font-style: normal;
      font-weight: 600;
      text-align: center;
    }

    .auditsummary__title {
      margin: 0.2em 0.5em 0 0;
      font-size: 1em;
      display: inline-block;
    }

    .auditsummary__tags {
      display: inline-block;
    }

    .vertical_align_center {
      display: inline-block;
      vertical-align: middle;
    }

    .auditsummary__severityicon, .auditsummary__severityicon svg {
      line-height: 100%;
      height: 100%;
    }

    .auditsummary__severityicon {
      display: inline-block;
      width: 1.3333em;
      height: 1.3333em;
      margin-right: 0.4em;
    }

    .ignore_vulnerability__info_text {
      font-size: 1em;
      font-weight: 600;
      margin: 0px;
    }

    .tag {
      background: #262626;
      color: white;
      padding: 0.3em 0.7em;
      font-size: 1em;
      border-radius: 0.25em;
    }

    .severity {
      padding: 0em 1em;
      display: inline-block;
      text-align: center;
      vertical-align: middle;
      border-radius: 0.1667em;
      white-space: nowrap;
      color: white;
      font-weight: 600;
      height: 2.5em;
      line-height: 2.5em;
    }

    .severity__edited {
      display: inline-block;
      vertical-align: middle;
      margin-top: 0.4em;
      margin-left: 0.2em;
      width: 1em;
    }

    .table--stats {
      margin-top: 2em;
    }

    .table--stats th, .table--stats td {
      padding: 0.8em 1em;
    }

    /* STATS SECTION */

    .statsoverview {
      margin-top: 1em;
    }

    .statschart__field {
      width: 220px;
      list-style-type: none;
      padding: 0.5em 0;
      padding-right: 2.5em;
      border-bottom: 1px solid #ECECEC;
      position: relative;
    }

    .statschart__field:last-of-type{
      border-color: transparent;
    }

    .statschart__field__color {
      display: inline-block;
      vertical-align: middle;
      width: 0.83em;
      height: 0.83em;
      border-radius: 50%;
      margin-right: 0.5em;
    }

    .statschart__field__name {
      text-transform: capitalize;
    }

    .statschart__field--info {
      min-width: 6.25em;
      margin-right: 4em;
    }

    .statschart__field--value {
      float: right;
    }

    .statschart__field--ignore-vul-icon {
      position: absolute;
      right: 0;
    }

    .analysis__risktag h4{
      font-size: 1em;
      font-weight: 600;
      margin: 0;
      margin-bottom: 0.8em;
    }

    .analysis__tags {
      float: right;
    }


    .analysis__overridecomment {
      border: 1px solid #ffeeed;
      background: #fff8f8;
      padding: 0.5em 0.75em;
      margin: 1em 0 2em;
    }

    .analysis__overridecomment__icon {
      width: 2em;
    }

    .analysis__overridecomment__icon img {
      vertical-align: 18%;
      width: 1.2em;
      height: 1.2em;
    }

    .table--analysis-cvssv3 tr:first-child td:first-child {
      width: 7em;
      text-align: center;
    }

    .table--analysis-cvssv3 td {
      padding: 0.35em 0.5em;
      border-color: #e4e2e2;
    }

    .analysis__sectionheader {
      border-bottom: 2px solid #efeeee;
      padding: 0.2em 0.5em;
      position: relative;
      color: #000;
      font-size: 1em;
      background: #f4f4f5;
      margin-top: 2em;
    }

    .analysis__cvss__value {
      font-weight: bold;
      font-size: 0.85em;
    }

    .analysis__attachment {
      margin: 4em 0;
      text-align: center;
    }

    .analysis__attachment:first-child {
      margin-top: 2em;
    }

    .analysis__attachment:last-child {
      margin-bottom: 2em;
    }

    .analysis__attachment__image {
      max-width: 100%;
      max-height: 50em;
    }

    .analysis__attachment__caption {
      text-align: center;
      font-size: 0.8em;
      font-style: italic;
    }

    .table--regulatory tr td:first-child {
      width: 30%;
      vertical-align: top;
    }

    .analysis__regulatory {
      margin-top: 3em;
    }

    .regulatory__block {
      position: relative;
      margin-bottom: 2em;
    }

    .regulatory__category {
      width: 12em;
      position: absolute;
    }

    .regulatory__table {
      padding-left: 12em;
      position: relative;
    }

    .regulatory__table__pcidss__title {
      margin-bottom: 0.5em;
    }

    .regulatory__table__hipaa__title {
      margin-bottom: 0.5em;
    }

    .regulatory__table__hipaa__standards {
      padding-left: 1.3em;
    }

    .regulatory__title {
      padding: 0;
      margin: 0;
    }

    .scan__types__header {
      background: #7d7d82;
      color: white;
      text-align: center;
    }

    .scan__type {
      text-align: center;
      padding-right: 1em;
      font-size: 0.9em;
    }

    .scan__type__icon {
      width: 1em;
      vertical-align: text-bottom;
      margin-right: 0.3em;
    }

    .scan_included__ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .scan_included__li {
        display: inline;
    }

    .scan_included__li:not(:last-child):after {
        content: ",";
    }
  </style>
</head>
<body>

  <!--------------------------
    COVER PAGE
  --------------------------->
  <section class="page coverpage">
    <!-- Title -->
    <h1 class="coverpage__title">{% trans "App Security Report" %}</h1>
    <div class="coverpage__tagline">{% trans "For Internal Purpose" %}</div>

    <!-- Client logo -->
    <div class="coverpage__preparedfor preparedfor">
      {% if report.prepared_for.logo != '' %}
        <div class="preparedfor__logo">
          <img src="{{ report.prepared_for.logo }}" alt="{{ report.prepared_for.name }}">
        </div>
      {% else %}
        <h2 class="preparedfor__name">{{ report.prepared_for.name }}</h2>
      {% endif %}
    </div>

    <!-- appmeta -->
    <div class="coverpage__appmeta">
      <table class="appmeta">
        <tr>
          <td class="appmeta__icon">
            <img src="{{ report.application.icon }}" />
          </td>
          <td class="appmeta__info">
            <div class="appmeta__title">{{ report.application.name }}</div>
            <div class="appmeta__detail">
              <span class="appmeta__package">{{ report.package_name }}</span>
              <img  class="appmeta__platform" src="{{ report.platform.icon }}" alt="{{ report.platform.name }}">
              <div class="appmeta__version">
                {{ report.application.version }}
              </div>
            </div>
          </td>
        </tr>
      </table>
    </div>

    <!-- prepared & powered -->
    <table class="coverpage__authors {% if not report.show_copyright %}coverpage__authors-extended{% endif %}">
      <tr>
        {% if not report.prepared_by.hide and not report.powered_by.hide %}
          <td class="author author--left">
            <div class="author__heading">{% trans "Prepared by" %}</div>
            {% if report.prepared_by.logo != '' %}
              <div class="author__logo">
                <img src="{{ report.prepared_by.logo }}" alt="{{ report.prepared_by.name }}">
              </div>
            {% else %}
              <h3 class="author__name">{{ report.prepared_by.name }}</h3>
            {% endif %}
          </td>
          <td class="author author--right">
            <div class="author__heading">{% trans "Powered by" %}</div>
            {% if report.powered_by.logo != '' %}
              <div class="author__logo">
                <img src="{{ report.powered_by.logo }}" alt="{{ report.powered_by.name }}">
              </div>
            {% else %}
              <h3 class="author__name">{{ report.powered_by.name }}</h3>
            {% endif %}
          </td>
        {% elif not report.prepared_by.hide and report.powered_by.hide %}
          <td class="author author--center">
            <div class="author__heading">
              {% trans "Prepared by" %}
            </div>
            {% if report.prepared_by.logo != '' %}
              <div class="author__logo">
                <img src="{{ report.prepared_by.logo }}" alt="{{ report.prepared_by.name }}">
              </div>
            {% else %}
              <h3 class="author__name">{{ report.prepared_by.name }}</h3>
            {% endif %}
          </td>
        {% elif report.prepared_by.hide and not report.powered_by.hide %}
          <td class="author author--center">
            <div class="author__heading">{% trans "Powered by" %}</div>
            {% if report.powered_by.logo != '' %}
              <div class="author__logo">
                <img src="{{ report.powered_by.logo }}" alt="{{ report.powered_by.name }}">
              </div>
            {% else %}
              <h3 class="author__name">{{ report.powered_by.name }}</h3>
            {% endif %}
          </td>
        {% endif %}
      </tr>
    </table>

    <!-- disclaimer -->
    <div class="coverpage__disclaimer">
      {% if report.show_copyright %}
        <p>{% trans "Portions of this document and the templates used in its production are the property of Appknox" %}{% if report.is_partnered and not report.powered_by.hide %}{% trans " and " %}{{ report.prepared_by.name }}{% trans "," %}{% endif %}{% trans " and cannot be copied without permission." %}</p>
      {% endif %}
      <p>{% trans "While precautions have been taken in the preparation of this document, the publisher and the author(s) assume no responsibility for errors, omissions, or for damages resulting from the use of the information contained herein. Use of " %}{% if report.show_copyright %}{% trans "Appknox" %}{% if report.is_partnered and not report.powered_by.hide %}{% trans " and " %}{{ report.prepared_by.name }}{% trans "," %}{% endif %}{% endif %}{% trans " services does not guarantee the security of a system, or that intrusions will not occur." %}</p>
    </div>

  </section>


  <!--------------------------
    APPLICATION DETAILS PAGE
  --------------------------->
  <section class="page appdetailpage">
    <div class="pagetitle__container">
      <h2 class="pagetitle pagetitle--main">{% trans "Application Details" %}</h2>
    </div>

    <table class="table table--bordered table--appdetail">
      <tr>
        <td>{% trans "Application Name" %}</td>
        <td>
            {{ report.application.name }} {% for meta_name in report.custom_meta_names %}<br>{{ meta_name }}{% endfor %}
        </td>
      </tr>
      <tr>
        <td>{% trans "Platform" %}</td>
        <td>{{ report.platform.name }}</td>
      </tr>
      <tr>
        <td>{% trans "Application Namespace" %}</td>
        <td>{{ report.package_name }}</td>
      </tr>
      <tr>
        <td>{% trans "Version" %}</td>
        <td>{{ report.application.version }}</td>
      </tr>
      <tr>
        <td>{% trans "Version Code" %}</td>
        <td>{{ report.application.version_code }}</td>
      </tr>
      <tr>
        <td>{% trans "Application SHA1 Hash" %}</td>
        <td>{{ report.application.sha1 }}</td>
      </tr>
      <tr>
        <td>{% trans "Application MD5 Hash" %}</td>
        <td>{{ report.application.md5 }}</td>
      </tr>
    </table>

    <div class="pagetitle__container">
      <h2 class="pagetitle pagetitle--main">{% trans "Audit Details" %}</h2>
    </div>

    <table class="table table--bordered table--appdetail">
      {% if report.appknox_file_id %}
        <tr>
          <td>{% trans "File ID" %}</td>
          <td>{{ report.appknox_file_id }}</td>
        </tr>
      {% endif %}
      <tr>
        <td>{% trans "Audit Date" %}</td>
        <td>{{ report.created_on }}</td>
      </tr>
      <tr>
        <td>{% trans "Scan Status" %}</td>
        <td>
          {% for assessment_type in report.assessment_types %}

          {% if assessment_type.can_include %}

          <span class="scan__type">
            {% if assessment_type.is_done %}
                <img class="scan__type__icon" src="{{ icon_done }}"></img>
            {% else %}
                <img class="scan__type__icon" src="{{ icon_not_done }}"></img>
            {% endif %}
            <span>{{ assessment_type.display }}</span>
          </span>

          {% endif %}

          {% endfor %}
        </td>
      </tr>
      <tr>
        <td>{% trans "Scans included in the Report" %}</td>
        <td>
            <ul class="scan_included__ul">
              {% for assessment_type in report.assessment_types %}

                {% if assessment_type.is_included %}
                    <li class="scan_included__li">{{ assessment_type.display }}</li>
                {% endif %}

              {% endfor %}
            </ul>
        </td>
      </tr>
    </table>

  </section>


  <!--------------------------
    TABLE OF CONTENTS PAGE
  --------------------------->
  <section class="page tocpage">
    <div class="pagetitle__container">
      <h2 class="pagetitle pagetitle--main">{% trans "Table of Contents" %}</h2>
    </div>

    <table class="table table--bordered table--toc">
      <tbody>
        <tr>
          <td>
            <h4 class="toc__heading">
              <a href="#report-summary">{% trans "Report Summary" %}</a>
            </h4>
          </td>
        </tr>
        <tr>
          <td>
            <a class="toc__subheading" href="#audit-summary">{% trans "Audit Summary" %}</a>
          </td>
        </tr>
        <tr>
          <td>
            <a class="toc__subheading" href="#security-rating">{% if report.show_copyright %}{% trans "Appknox " %}{% endif %}{% trans "Security Rating" %}</a>
          </td>
        </tr>
        {% for analysis in report.viewable_analyses %}
          {% if analysis.risk.computed_value > 0 %}
            <tr>
              <td>
                <h4 class="toc__heading">
                  <a href="#{{ analysis.id }}">{{ analysis.title.html }}</a>
                </h4>
              </td>
            </tr>
            {% if analysis.incorrect_implementation.html %}
              <tr>
                <td>
                  <a class="toc__subheading" href="#{{ analysis.id }}{{ forloop.counter }}non-compliant">{% trans "Noncompliant Code Example" %}</a>
                </td>
              </tr>
            {% endif %}
            {% if analysis.correct_implementation.html %}
              <tr>
                <td>
                  <a class="toc__subheading" href="#{{ analysis.id }}{{ forloop.counter }}compliant">{% trans "Compliant Solution" %}</a>
                </td>
              </tr>
            {% endif %}
            {% if analysis.business_implication.html %}
              <tr>
                <td>
                  <a class="toc__subheading" href="#{{ analysis.id }}{{ forloop.counter }}business-implication">{% trans "Business Implication" %}</a>
                </td>
              </tr>
            {% endif %}
            {% if analysis.vulnerability_references.html %}
              <tr>
                <td>
                  <a class="toc__subheading" href="#{{ analysis.id }}{{ forloop.counter }}related-to">{% trans "Related Vulnerabilities" %}</a>
                </td>
              </tr>
            {% endif %}
          {% endif %}
        {% endfor %}
      </tbody>
    </table>
  </section>


  <!--------------------------
    REPORT SUMMARY PAGE
  --------------------------->
  <section class="page summarypage">
    <a id="report-summary"></a>
    <div class="pagetitle__container">
      <h2 class="pagetitle pagetitle--main">{% trans "Report Summary" %}</h2>
    </div>

    <p>{% if report.show_copyright %}{% if report.is_partnered and not report.powered_by.hide %}{{ report.prepared_by.name }}{% trans ", powered by " %}{% endif %}{% trans "Appknox" %}{% if report.is_partnered and not report.powered_by.hide %}{% trans "," %}{% endif %}{% trans " conducted a security assessment of the mobile application. " %}{% endif %}{% trans "This report is generated based on the findings during the automated" %}{% if report.is_manual_scan_included %}{% trans " and manual" %}{% endif %}{% trans " auditing process. It also contains the process of discovering those vulnerabilities in the first place, and ways to remediate those issues." %}</p>
    <section class="audit">
      <a id="audit-summary"></a>
      <h3 class="pagetitle pagetitle--sub">{% trans "Audit Summary" %}</h3>
      <div>
        <table class="table table--bordered table--auditsummary">
          <tbody>
            {% for analysis in report.viewable_analyses %}
              <tr class="auditsummary">
                <td class="auditsummary__info">
                  <h5 class="auditsummary__title">{{ analysis.title.html | safe }}</h5>
                  <div class="auditsummary__tags">
                    {% for tag in analysis.tags %}
                      <span class="auditsummary__tag tag">{{ tag.val }}</span>
                    {% endfor %}
                  </div>
                  {% if analysis.risk.computed_value == -1 %}
                    <p class="auditsummary__desc">{{ analysis.question.html | safe  }}</p>
                  {% elif analysis.risk.computed_value == 0 %}
                    <p class="auditsummary__desc">
                      <div style="margin-bottom: 0.8em;">{{ analysis.success_message.html | safe  }}</div>

                      {% if analysis.risk.is_overridden and analysis.risk.value > 0 %}
                        <div class="analysis__overridecomment">
                          <div style="margin-bottom: 0.5em;">
                              <strong>{% trans "Note:" %}</strong>
                                {% trans "This vulnerability was manually overridden to Passed" %} {% if analysis.risk.overridden_by %}&nbsp;{% trans "by" %}&nbsp;{{ analysis.risk.overridden_by }} {% trans "on" %} {{ analysis.risk.overridden_date }}.{% endif %} {% trans "This override is applied" %} {% if analysis.risk.overridden_criteria == "all_future_upload" %} {% trans "to the current and all future uploads." %} {% else %} {% trans "only to the current file." %} {% endif %}
                            </div>
                            <div>
                              <strong>Reason:</strong> {{ analysis.risk.override_comment | escape  }}
                            </div>
                        </div>
                      {% endif %}
                    </p>
                  {% else %}
                    <p class="auditsummary__desc">{{ analysis.desc.html | safe  }}</p>
                  {% endif %}
                </td>

                <td class="auditsummary__score">
                  {% if analysis.risk.computed_value > 0 %}
                    <div class="auditsummary__cvssscore {% if analysis.risk.is_overridden %}auditsummary__cvssscore--padded {% endif %}" style="color: {{ analysis.risk.computed_value_color }}">{{ analysis.cvss_v3.base_score }}</div>
                  {% endif %}

                  <label class="auditsummary__severity severity" style="background-color: {{ analysis.risk.computed_value_color }}">
                    {% if analysis.risk.is_overridden and analysis.risk.value > 0 %}
                      <div class="auditsummary__severityicon vertical_align_center">
                        <img src="{{ analysis_edit_icon }}" alt="overriden risk edit icon">
                      </div>
                    {% endif %}


                    {{ analysis.risk.computed_value_label }}
                  </label>
                </td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
    </section>

  </section>


  <!--------------------------
    SECURITY STATS PAGE
  --------------------------->
  <section class="page statspage">
    <table class="table table--bordered table--stats">
      <tbody>
        <tr>
          <th>{% trans "Priority Level" %}</th>
          <th>{% trans "Number of failed test cases" %}</th>
        </tr>
        <tr>
          <td>{% trans "Critical Risk" %}</td>
          <td>{{ report.critical_count }}</td>
        </tr>
        <tr>
          <td>{% trans "High Risk" %}</td>
          <td>{{ report.high_count }}</td>
        </tr>
        <tr>
          <td>{% trans "Medium Risk" %}</td>
          <td>{{ report.medium_count }}</td>
        </tr>
        <tr>
          <td>{% trans "Low Risk" %}</td>
          <td>{{ report.low_count }}</td>
        </tr>
      </tbody>
    </table>

    <section class="statsoverview">
      <a id="security-rating"></a>
      <h3 class="pagetitle pagetitle--sub">{% if report.show_copyright %}{% trans "Appknox " %}{% endif %}{% trans "Security Rating" %}</h3>
      <div class="statsoverview__chart">
        <table>
          <tbody>
            <tr>
              {% if report.svg_chart %}
                <td>
                  <img src="{{ report.svg_chart }}" alt="">
                </td>
              {% endif %}
              <td>
                <ul class="statschart__fields">
                  <li class="statschart__field statschart__field--critical">
                    <div class="statschart__field--info vertical_align_center">
                      <span class="statschart__field__color" style="background: {{ report.COLOR_CRITICAL }}"></span>
                      <span class="statschart__field__name vertical_align_center">{% trans "Critical" %}</span>
                    </div>

                    <div class="vertical_align_center statschart__field--value">
                      <strong class="vertical_align_center">{{ report.critical_percent }}%</strong>
                    </div>
                  </li>

                  <li class="statschart__field statschart__field--high">
                    <div class="statschart__field--info vertical_align_center">
                      <span class="statschart__field__color" style="background: {{ report.COLOR_HIGH }}"></span>
                      <span class="statschart__field__name vertical_align_center">{% trans "High" %}</span>
                    </div>

                    <div class="vertical_align_center statschart__field--value">
                      <strong class="vertical_align_center">{{ report.high_percent }}%</strong>
                    </div>
                  </li>

                  <li class="statschart__field statschart__field--medium">
                    <div class="statschart__field--info vertical_align_center">
                      <span class="statschart__field__color" style="background: {{ report.COLOR_MEDIUM }}"></span>
                      <span class="statschart__field__name vertical_align_center">{% trans "Medium" %}</span>
                    </div>

                    <div class="vertical_align_center statschart__field--value">
                      <strong class="vertical_align_center">{{ report.medium_percent }}%</strong>
                    </div>
                  </li>

                  <li class="statschart__field statschart__field--low">
                    <div class="statschart__field--info vertical_align_center">
                      <span class="statschart__field__color" style="background: {{ report.COLOR_LOW }}"></span>
                      <span class="statschart__field__name vertical_align_center">{% trans "Low" %}</span>
                    </div>

                    <div class="vertical_align_center statschart__field--value">
                      <strong class="vertical_align_center">{{ report.low_percent }}%</strong>
                    </div>
                  </li>

                  <li class="statschart__field statschart__field--passed">
                    <div class="statschart__field--info vertical_align_center">
                      <span class="statschart__field__color" style="background: {{ report.COLOR_PASSED }}"></span>
                      <span class="statschart__field__name vertical_align_center">{% trans "Passed" %}</span>
                    </div>

                    <div class="vertical_align_center statschart__field--value">
                      <strong class="vertical_align_center">{{ report.passed_percent }}%</strong>
                    </div>

                    {% if report.passed_overridden_count %}
                      <img class="vertical_align_center statschart__field--ignore-vul-icon" src="{{ edit_icon }}" />
                    {% endif %}
                  </li>

                  {% if report.hide_untested_analyses %}
                    <li class="statschart__field statschart__field--untested">
                      <div class="statschart__field--info vertical_align_center">
                        <span class="statschart__field__color" style="background: {{ report.COLOR_UNTESTED }}"></span>
                        <span class="statschart__field__name vertical_align_center">{% trans "Untested" %}</span>
                      </div>
                      <div class="vertical_align_center statschart__field--value">
                        <strong class="vertical_align_center">{{ report.untested_percent }}%</strong>
                      </div>
                    </li>
                  {% endif %}
                </ul>
              </td>
            </tr>
          </tbody>
        </table>
      </div>

      <div>
        <p>{% if report.show_copyright %}{% trans "Appknox " %}{% endif %}{% trans "Security Rating" %}&nbsp;-&nbsp; <strong>{{ report.rating }} {% trans "Unsecured" %}</strong></p>
        <div class="vertical_align_center">
          {% if report.passed_overridden_count %}
            <img class="vertical_align_center" src="{{ edit_icon }}" />
            <p class="ignore_vulnerability__info_text vertical_align_center">Out of all the Passed vulnerabilities, {{ report.passed_overridden_count }} have been manually overridden to ‘Passed’. </p>
          {% endif %}
        </div>
      </div>
    </section>
  </section>



  <!--------------------------
    ANALYSIS DETAIL PAGES
  --------------------------->
  {% for analysis in report.viewable_analyses %}
    {% if analysis.risk.computed_value > 0 %}
      <section class="page analysispage">
        <a id="{{ analysis.id }}"></a>
        <div class="pagetitle__container">
          <h2 class="pagetitle pagetitle--main">{{ analysis.title.html | safe }}</h2>
        </div>
        <div class="analysis">
          <section class="analysis__description">
            <p>{{ analysis.intro.html | safe }}</p>
          </section>

          <section class="analysis__risktag">
            <table class="table">
              <tbody>
                <tr>
                  <td>
                    <div>
                      <h4>{% trans "Risk Rating" %}</h4>

                      <label class="analysis__severity severity" style="background-color: {{ analysis.risk.computed_value_color }}">
                        {% if analysis.risk.is_overridden %}
                          <div class="analysis__severityicon vertical_align_center">
                            <img src="{{ analysis_edit_icon }}" alt="overriden risk edit icon">
                          </div>
                        {% endif %}

                        {{ analysis.risk.computed_value_label }}
                      </label>
                    </div>
                  </td>

                  <td class="analysis__tags">
                    <h4>{% trans "Scan Type" %} </h4>

                    <div>
                      <div>
                        {% for tag in analysis.tags %}
                          <label class="tag">{{ tag.val }}</label>
                        {% endfor %}
                      </div>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
            {% if analysis.risk.is_overridden %}
              <div class="analysis__overridecomment">
                <table class="table">
                  <tbody>
                    <tr>
                      <td class="analysis__overridecomment__icon">
                        <img class="analysis__overridecomment__svg" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjE4cHgiIGhlaWdodD0iMThweCI+ICAgIDxnPiAgICAgICAgPGc+ICAgICAgICAgICAgPHBhdGggZD0iTTI1NiwwQzExNC40OTcsMCwwLDExNC41MDcsMCwyNTZjMCwxNDEuNTAzLDExNC41MDcsMjU2LDI1NiwyNTZjMTQxLjUwMywwLDI1Ni0xMTQuNTA3LDI1Ni0yNTYgICAgQzUxMiwxMTQuNDk3LDM5Ny40OTMsMCwyNTYsMHogTTI1Niw0NzJjLTExOS4zOTMsMC0yMTYtOTYuNjE1LTIxNi0yMTZjMC0xMTkuMzkzLDk2LjYxNS0yMTYsMjE2LTIxNiAgICBjMTE5LjM5MywwLDIxNiw5Ni42MTUsMjE2LDIxNkM0NzIsMzc1LjM5MywzNzUuMzg1LDQ3MiwyNTYsNDcyeiIgZmlsbD0iI2Y3YmRiNyIvPiAgICAgICAgPC9nPiAgICA8L2c+ICAgIDxnPiAgICAgICAgPGc+ICAgICAgICAgICAgPHBhdGggZD0iTTI1NiwxMjguODc3Yy0xMS4wNDYsMC0yMCw4Ljk1NC0yMCwyMFYyNzcuNjdjMCwxMS4wNDYsOC45NTQsMjAsMjAsMjBzMjAtOC45NTQsMjAtMjBWMTQ4Ljg3NyAgICBDMjc2LDEzNy44MzEsMjY3LjA0NiwxMjguODc3LDI1NiwxMjguODc3eiIgZmlsbD0iI2Y3YmRiNyIvPiAgICAgICAgPC9nPiAgICA8L2c+ICAgIDxnPiAgICAgICAgPGc+ICAgICAgICAgICAgPGNpcmNsZSBjeD0iMjU2IiBjeT0iMzQ5LjE2IiByPSIyNyIgZmlsbD0iI2Y3YmRiNyIvPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+" alt="">
                      </td>

                      <td class="analysis__overridecomment__msg">
                        {% trans "This risk has been overridden from" %} <strong>{{ analysis.risk.value_label }}</strong> {% trans "to" %} <strong>{{ analysis.risk.computed_value_label }}</strong> {% if analysis.risk.overridden_by %} {% trans "by" %} <strong>{% trans analysis.risk.overridden_by %}</strong>. on <strong>{% trans analysis.risk.overridden_date %}</strong> {% endif %} <br />{% if analysis.risk.override_comment %} {% trans "The reason is:" %} "{{ analysis.risk.override_comment }}"{% endif %}
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
            {% endif %}
          </section>

          <section class="analysis__cvss">
            <h3 class="analysis__sectionheader">{% trans "CVSS" %}</h3>
            <table class="table table--bordered table--analysis-cvssv3">
              <tbody>
                <tr>
                  <td rowspan="4">
                    <div class="analysis__cvss__scoretitle">{% trans "Version 3.0 Base Score" %}</div>
                    <h2 class="analysis__cvss__scorevalue" style="color: {{ analysis.risk.value_color }}">{{ analysis.cvss_v3.base_score }}</h2>
                  </td>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Attack vector" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.attack_vector }}</span>
                  </td>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Attack complexity" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.attack_complexity }}</span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Privileges required" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.privileges_required }}</span>
                  </td>
                  <td>
                    <span class="analysis__cvss__key">{% trans "User Interaction" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.user_interaction }}</span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Scope" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.scope }}</span>
                  </td>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Confidentiality Impact" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.confidentiality_impact }}</span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Integrity Impact" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.integrity_impact }}</span>
                  </td>
                  <td>
                    <span class="analysis__cvss__key">{% trans "Availability Impact" %}:</span>
                    <span class="analysis__cvss__value">{{ analysis.cvss_v3.availability_impact }}</span>
                  </td>
                </tr>
              </tbody>
            </table>
          </section>

          {% if analysis.regulatory.owasp or analysis.regulatory.cwe or analysis.regulatory.mstg or analysis.regulatory.masvs or analysis.regulatory.owaspapi2023 or analysis.regulatory.owaspmobile2024 or analysis.regulatory.asvs or analysis.regulatory.pcidss or analysis.regulatory.hipaa or analysis.regulatory.gdpr or analysis.regulatory.nistsp80053 or analysis.regulatory.nistsp800171 %}
            <section class="analysis__regulatory">
              <h3 class="analysis__sectionheader">{% trans "Regulatory" %}</h3>
              <div class="regulatory__block">
                {% if analysis.regulatory.owasp %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "OWASP" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for owasp in analysis.regulatory.owasp %}
                        <tr>
                          <td>{{ owasp.code }}</td>
                          <td>{{ owasp.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>
              <div class="regulatory__block">
                {% if analysis.regulatory.owaspmobile2024 %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "OWASP Mobile Top 10 (2024)" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for owaspmobile2024 in analysis.regulatory.owaspmobile2024 %}
                        <tr>
                          <td>{{ owaspmobile2024.code }}</td>
                          <td>{{ owaspmobile2024.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.cwe %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "CWE" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for cwe in analysis.regulatory.cwe %}
                        <tr>
                          <td>{{ cwe.code }}</td>
                          <td><a href="{{cwe.url}}">{{ cwe.url }}</a></td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.mstg %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "MSTG" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for mstg in analysis.regulatory.mstg %}
                        <tr>
                          <td>{{ mstg.code }}</td>
                          <td>{{ mstg.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.masvs %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "OWASP MASVS (v2)" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for masvs in analysis.regulatory.masvs %}
                        <tr>
                          <td>{{ masvs.code }}</td>
                          <td>{{ masvs.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.owaspapi2023 %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "OWASP API 2023" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for owaspapi2023 in analysis.regulatory.owaspapi2023 %}
                        <tr>
                          <td>{{ owaspapi2023.code }}</td>
                          <td>{{ owaspapi2023.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.asvs %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "ASVS" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for asvs in analysis.regulatory.asvs %}
                        <tr>
                          <td>{{ asvs.code }}</td>
                          <td>{{ asvs.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.pcidss %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "PCI-DSS" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for pcidss in analysis.regulatory.pcidss %}
                        <tr>
                          <td>{{ pcidss.code }}</td>
                          <td>
                            <div class="regulatory__table__pcidss__title"><strong>{{ pcidss.title }}</strong></div>
                            <div>{{ pcidss.description }}</div>
                          </td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.hipaa %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "HIPAA" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for hipaa in analysis.regulatory.hipaa %}
                        <tr>
                          <td>{{ hipaa.code }}</td>
                          <td>
                            <div class="regulatory__table__hipaa__title"><strong>{{ hipaa.safeguard }}: {{ hipaa.title }}</strong></div>
                            <ul class="regulatory__table__hipaa__standards">
                                {% for std in hipaa.standards %}
                                    <li>
                                        <strong>{{ std.title }} ({{ std.specifications }})</strong>
                                        <div>{{ std.description }}</div>
                                    </li>
                                {% endfor %}
                            </ul>
                          </td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.gdpr %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "GDPR" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for gdpr in analysis.regulatory.gdpr %}
                        <tr>
                          <td>{{ gdpr.code }}</td>
                          <td>{{ gdpr.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.nistsp80053 %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "NIST SP 800-53" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for nistsp80053 in analysis.regulatory.nistsp80053 %}
                        <tr>
                          <td>{{ nistsp80053.code }}</td>
                          <td>{{ nistsp80053.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

              <div class="regulatory__block">
                {% if analysis.regulatory.nistsp800171 %}
                  <div class="regulatory__category">
                    <strong class="regulatory__title">{% trans "NIST SP 800-171" %}</strong>
                  </div>
                  <table class="table table--regulatory regulatory__table">
                    <tbody>
                      {% for nistsp800171 in analysis.regulatory.nistsp800171 %}
                        <tr>
                          <td>{{ nistsp800171.code }}</td>
                          <td>{{ nistsp800171.title }}</td>
                        </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% endif %}
              </div>

            </section>
          {% endif %}

          <section class="analysis__assessment">
            <h3 class="analysis__sectionheader">{% trans "Risk Assessment" %}</h3>
            <div>
              <p>{{ analysis.desc.html | safe }}</p>
              {% for finding in analysis.findings %}
                {% if finding.title.html %}
                  <h5 class="wrap-content">{{ finding.title.html | escape }}</h5>
                {% endif %}
<pre>
<code>{{ finding.description.html | escape }}</code>
</pre>
              {% endfor %}
            </div>
          </section>

          {% if analysis.attachments %}
          <section class="analysis__attachments">
            {% for attachment in analysis.attachments %}
              <figure class="analysis__attachment">
                <img class="analysis__attachment__image" src="{{ attachment.url }}" alt="">
                <figcaption class="analysis__attachment__caption">{{ attachment.name }}</figcaption>
              </figure>
            {% endfor %}
          </section>
          {% endif %}

          {% if analysis.incorrect_implementation.html %}
            <section class="analysis__incorrect">
              <a id="{{ analysis.id }}{{ forloop.counter }}non-compliant"></a>
              <h3 class="analysis__sectionheader">{% trans "Noncompliant Code Example" %}</h3>
              <div>{{ analysis.incorrect_implementation.html | safe }}</div>
            </section>
          {% endif %}

          {% if analysis.correct_implementation.html %}
            <section class="analysis__correct">
              <a id="{{ analysis.id }}{{ forloop.counter }}compliant"></a>
              <h3 class="analysis__sectionheader">{% trans "Compliant Solution" %}</h3>
              <div>{{ analysis.correct_implementation.html | safe }}</div>
            </section>
          {% endif %}

          {% if analysis.business_implication.html %}
            <section class="analysis__implication">
              <a id="{{ analysis.id }}{{ forloop.counter }}business-implication"></a>
              <h3 class="analysis__sectionheader">{% trans "Business Implication" %}</h3>
              <div>{{ analysis.business_implication.html | safe }}</div>
            </section>
          {% endif %}

          {% if analysis.vulnerability_references.html %}
            <section class="analysis__reference">
              <a id="{{ analysis.id }}{{ forloop.counter }}related-to"></a>
              <h3 class="analysis__sectionheader">{% trans "Related Vulnerabilities" %}</h3>
              <div>{{ analysis.vulnerability_references.html | safe }}</div>
            </section>
          {% endif %}

        </div>
      </section>
    {% endif %}
  {% endfor %}


  <!--------------------------
    REFERENCES PAGE
  --------------------------->
  <section class="page refpage">
    <a id="references"></a>
    <div class="pagetitle__container">
      <h2 class="pagetitle pagetitle--main">{% trans "References" %}</h2>
    </div>
    <ol>
      {% for ref in report.references %}
        <li><a href="{{ ref.url }}">{{ ref.name }}</a></li>
      {% endfor %}
    </ol>
  </section>

</body>
</html>
{% endwith %}
