refactor: JSON data column for findings, code snippets captured and displayed

This commit is contained in:
Marker689
2026-05-09 05:52:10 +03:00
parent e83167a938
commit e577f1944c
11 changed files with 60 additions and 57 deletions

View File

@@ -16,12 +16,13 @@
<h2>Findings ({{ scan.findings|length }})</h2>
{% if scan.findings %}
{% for f in scan.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>
{% for f in scan.findings|sort(attribute='data.severity', reverse=true) %}
<article class="finding-card {{ f.data.severity }}">
<strong class="severity-{{ f.data.severity }}">[{{ f.data.severity }}]</strong>
<strong>{{ f.data.rule }}</strong>
{% if f.data.location %}<small> @ {{ f.data.location }}</small>{% endif %}
<p>{{ f.data.message }}</p>
{% if f.data.code %}<pre><code>{{ f.data.code }}</code></pre>{% endif %}
</article>
{% endfor %}
{% else %}