{% include "base.html" %} {% set run = runs[-1] %} {% set invocation = run.invocations[-1] %} {% set results = run.results %} {% set metrics = run.properties.metrics %} {% set tool = run.tool %} {% set rules = tool.driver.rules %} {% set isError = True if metrics.critical > 0 or metrics.high > 0 or metrics.medium > 5 else False %} {% set versionControlProvenance = run.versionControlProvenance[-1] %}
{% include "header.html" %}

SAST Scan Status

Report from the scan performed on   {{ invocation.endTimeUtc|replace("T", " at ")|replace("Z", "") }} for   {{ versionControlProvenance.repositoryUri|default('local')}}

Repository Details
{{ versionControlProvenance.repositoryUri|default('local') }}
Branch {{ versionControlProvenance.branch }}
Commit {{ versionControlProvenance.revisionId }}
Invocation Details
{{ tool.driver.name }}
Run Id {{ inlineExternalProperties[-1].runGuid }}
Directory {{ invocation.workingDirectory.uri }}

Executive Summary

This report was generated by ShiftLeft from the SAST Scan invocation on {{ invocation.endTimeUtc|replace("T", " at ")|replace("Z", "") }}. The scan used the tool {{ tool.driver.name }} to scan the source code repository {{ versionControlProvenance.repositoryUri|default('local')|urlize(40, target='_blank') }}.

{% if metrics.total %}

Below is a summary of the issues identified:

{% for sev in ["critical", "high", "medium", "low", "total"] -%} {%- endfor %}
Severity Count
{{ sev|upper }} {{ metrics.get(sev)|default('NA') }}
{% endif %} {% if isError %}

 

  ShiftLeft recommends immediate remediation of the key issues identified before using this application in a live environment.

{% else %}

 

  Based on this report, the application is certified as ready for deployment to test and production environments. Please refer to the dependency and container scan reports (if available) for additional context.

{% endif %}
{% if key_issues|length %}

{% if metrics.critical %} Key Issues {{ key_issues|length }} / {{ metrics.critical }} {% elif metrics.high %} Top High Vulnerabilities {{ key_issues|length }} / {{ metrics.high }} {% elif metrics.medium %} Top Medium Vulnerabilities {{ key_issues|length }} / {{ metrics.medium }} {% endif %}

{% for result in key_issues -%} {% set result_index = loop.index %}
{% for location in result.locations -%}

{{ result.ruleId|default('') }}

{{ location.physicalLocation.artifactLocation.uri|basename }}

{{ result.message.text|auto_text_highlight|safe }}

{% set allLines = location.physicalLocation.contextRegion.snippet.text %} {% set line_count = allLines.split("\n") %} {% set firstLine = allLines.split("\n")[0].strip() %} {% set remLines = "
".join(allLines.split("\n")[1:]) %} {% if line_count|length and allLines != "" %}
 {{ location.physicalLocation.contextRegion.startLine }}: {{ firstLine|safe }}
{{ remLines|safe }}
{% endif %}
{%- endfor %}
{%- endfor %}
{% endif %}

All Issues ({{ metrics.total }})

{% for result in results|sort(attribute="properties.issue_severity") -%} {% set result_index = loop.index %} {% for location in result.locations -%} {% set allLines = location.physicalLocation.contextRegion.snippet.text %} {% set line_count = allLines.split("\n") %} {% set firstLine = allLines.split("\n")[0].strip() %} {% set remLines = "
".join(allLines.split("\n")[1:]) %} {%- endfor %} {%- endfor %}
Rule Severity Source location Message
{{ result.ruleId|default('')|linkify_rule(rules)|safe }} {{ result.properties.issue_severity }} {{ location.physicalLocation.artifactLocation.uri|basename }} {{ result.message.text|auto_text_highlight|safe }} {% if line_count|length and allLines != "" %}
{{ firstLine|safe }}
{{ remLines|safe }}
{% endif %}

Thank you for using ShiftLeft. Looking for a more detailed analysis? Check out Inspect, our next generation SAST product

{% include "chart.html" %}