{# OVERALL REPORT HEADER START #} {% block main_header scoped %}
{% block main_header_name scoped %}MythX Report for {{ target }}{% endblock %}
{% endblock %} {# OVERALL REPORT HEADER END #} {% for status, report, input in issues_list %} {# ISSUE REPORT HEADER START #} {% block report_header scoped %}

{% block report_header_name scoped %} Report for {{ input.main_source }} and Dependencies {% endblock %} {% block report_header_link scoped %} {% block report_header_link_name scoped %} ({{ report.uuid }}) {% endblock %} {% endblock %}

{% endblock %} {# ISSUE REPORT HEADER END #} {% if report %} {# STATUS SECTION START #}
{% block section_status scoped %}
{% block section_status_high scoped %}High{% endblock %} {% block section_status_medium scoped %}Medium{% endblock %} {% block section_status_low scoped %}Low{% endblock %} {% block section_status_unknown scoped %}Unknown{% endblock %}
{{ status.vulnerability_statistics.high }} {{ status.vulnerability_statistics.medium }} {{ status.vulnerability_statistics.low }} {{ status.vulnerability_statistics.none }}
{% endblock %}
{# STATUS SECTION END #} {# REPORT SECTION START #}
{% block section_report scoped %} {% set line_dict = {} %} {% for issue in report %} {% for location in issue.decoded_locations %} {% set loc=issue.locations[loop.index0] %} {% if loc.source_format == "text" %} {% endif %} {% endfor %} {% endfor %}
{% block section_report_id scoped %}ID{% endblock %} {% block section_report_severity scoped %}Severity{% endblock %} {% block section_report_name scoped %}Name{% endblock %} {% block section_report_file scoped %}File{% endblock %} {% block section_report_location scoped %}Location{% endblock %}
{{ issue.swc_id }} {{ issue.severity|title }} {{ issue.swc_title }} {{ loc.source_list[loc.source_map.components[0].file_id] }} L: {{ location.start_line }} C: {{ location.start_column }}
{% endblock %}
{# REPORT SECTION END #} {# CODE SECTION START #}
{% block section_code scoped %} {% set line_dict = {} %} {% for issue in report %} {% for location in issue.decoded_locations %} {% set filename="undefined" %} {% set loc=issue.locations[loop.index0] %} {% if loc.source_format == "text" %} {% set x=line_dict.__setitem__(location.start_line, (loc.source_list[loc.source_map.components[0].file_id], issue)) %} {% endif %} {% endfor %} {% endfor %}
{% block section_code_name scoped %}Source Code{% endblock %} {% for filename, data in input.sources.items() %}
{{ filename }}
{% for line in data["source"].split("\n") %}
{% if loop.index in line_dict and line_dict[loop.index][0] == filename %}
{{ line }}

{{ line_dict[loop.index][1].swc_id }} - {{ line_dict[loop.index][1].swc_title }}

{% if line_dict[loop.index][1].extra_data["testCases"] %} {% for case in line_dict[loop.index][1].extra_data["testCases"] %}
{% set case_idx=loop.index %} {% block section_case_name scoped %}Test Case {{ case_idx }}{% endblock %} {% for step in case["steps"] %} {% set step_idx=loop.index %}
{% block section_code_step_name scoped %}Step {{ step_idx }}{% endblock %} {% for key, value in step.items() %} {% endfor %}
{{ key }} {{ value }}
{% endfor %}
{% endfor %} {% else %}

{% block section_code_empty_name scoped %}No test cases to display.{% endblock %}

{% endif %}
{% else %} {{ line }} {% endif %} {% endfor %}
{% endfor %}
{% endblock %}
{# CODE SECTION END #} {% else %}

{% block no_issues_name scoped %}No issues were found.{% endblock %}

{% endif %} {% endfor %}