{# 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.sources.keys()|join(", ") }} {% 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 x=line_dict.__setitem__(location.start_line, (issue.severity|lower, issue.extra_data["testCases"])) %} {% 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 }} {% for loc in issue.locations %} {% if loc.source_format == "text" %} {{ loc.source_list[0] }} {% endif %} {% endfor %} 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 x=line_dict.__setitem__(location.start_line, (issue.severity|lower, issue.extra_data["testCases"])) %} {% 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 %}
                                                
{{ line }} {% if line_dict[loop.index][1] %} {% for case in line_dict[loop.index][1] %}
{% 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 %}