38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h1>{{ pkg_name }} <small>v{{ pkg_version }}</small></h1>
|
|
|
|
<h2>Scans ({{ scans|length }})</h2>
|
|
<table>
|
|
<thead>
|
|
<tr><th>ID</th><th>Repo</th><th>Status</th><th>Findings</th><th>Time</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for s in scans %}
|
|
<tr>
|
|
<td><a href="/scans/{{ s.id }}">#{{ s.id }}</a></td>
|
|
<td>{{ s.repository }}</td>
|
|
<td><span class="status-{{ s.status }}">{{ s.status }}</span></td>
|
|
<td>{% if s.flagged %}<span class="flagged">{{ s.total_findings }}</span>{% else %}<span class="clean">0</span>{% endif %}</td>
|
|
<td>{{ s.started_at.strftime('%Y-%m-%d %H:%M') if s.started_at }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<h2>Findings ({{ findings|length }})</h2>
|
|
{% if findings %}
|
|
{% for f in findings|sort(attribute='severity', reverse=true) %}
|
|
<article class="finding-card {{ f.severity }}">
|
|
<strong class="severity-{{ f.severity }}">[{{ f.severity }}]</strong>
|
|
<strong>{{ f.rule }}</strong>
|
|
{% if f.location %}<small> @ {{ f.location }}</small>{% endif %}
|
|
<p>{{ f.message }}</p>
|
|
{% if f.code %}<pre><code>{{ f.code }}</code></pre>{% endif %}
|
|
</article>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p class="clean">No findings — package looks clean.</p>
|
|
{% endif %}
|
|
{% endblock %}
|