{% if result.success %}
{% if scan_type == 'dependency' or scan_type == 'vuln_intel' %} Vulnerability Intelligence Complete {% elif scan_type == 'full' %} Full Security Scan Complete {% else %} Code Security Scan Complete {% endif %}

{{ result.summary.total_findings }} finding{{ result.summary.total_findings|pluralize }} detected {% if result.summary.ai_packages_found %} • {{ result.summary.ai_packages_found }} AI package{{ result.summary.ai_packages_found|pluralize }} analyzed {% endif %}

{% if result.ai_packages %}
AI/ML Packages Detected:
{% for pkg, version in result.ai_packages.items %} {{ pkg }}{% if version and version != 'unknown' %}=={{ version }}{% endif %} {% endfor %}
{% endif %} {% if result.summary.total_findings > 0 %}
{{ result.summary.by_severity.CRITICAL|default:0 }}
Critical
{{ result.summary.by_severity.HIGH|default:0 }}
High
{{ result.summary.by_severity.MEDIUM|default:0 }}
Medium
{{ result.summary.by_severity.LOW|default:0 }}
Low
{% for finding in result.findings|slice:":10" %}
{{ finding.severity|upper }} {{ finding.rule_id }}

{{ finding.message|default:"Security finding" }}

{% if finding.file_path %} {{ finding.file_path }}{% if finding.line_number %}:{{ finding.line_number }}{% endif %} {% endif %}
{% endfor %} {% if result.findings|length > 10 %}
{% if project %} View all {{ result.findings|length }} findings → {% else %} Showing 10 of {{ result.findings|length }} findings {% endif %}
{% endif %}
{% else %}

{% if scan_type == 'dependency' or scan_type == 'vuln_intel' %} No known vulnerabilities found in AI/ML dependencies! {% elif scan_type == 'full' %} No security issues or vulnerabilities detected. Your project looks secure! {% else %} No security issues detected. Your project looks secure! {% endif %}

{% endif %} {% if result.errors %}
Partial scan - some sources had issues:
{% endif %}
{% if result.summary.scans_executed %} Scans: {{ result.summary.scans_executed|join:", " }} {% elif result.summary.probes_executed %} Probes: {{ result.summary.probes_executed|join:", " }} {% elif result.summary.sources_queried %} Sources: {% if result.summary.sources_queried.nvd %}NVD{% endif %}{% if result.summary.sources_queried.osv %}, OSV{% endif %}{% if result.summary.sources_queried.ghsa %}, GHSA{% endif %} {% endif %} {% if project %} Refresh Page {% endif %}
{% else %}
Scan Failed

{{ result.error|default:"Unknown error occurred" }}

Troubleshooting:
{% endif %}