Skip to content

Commit

Permalink
chg: [website] Improved displaying of affected products. Related to #78.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Nov 27, 2024
1 parent 37d57ad commit 5f9826a
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions website/web/templates/vulnerability_templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h6 class="card-subtitle mb-2 text-body-secondary">
<div class="col-md-2 fw-bold" data-bs-toggle="tooltip" data-bs-placement="left" title="Exploit Prediction Scoring System (EPSS) from FIRST. The EPSS score is representing the probability of exploitation in the wild in the next 30 days.">EPSS score <span style="color: green;">?</span></div>
<div class="col">
<span id="epss-score"></span>
<span id="epss-percentile" style="text-decoration:underline dotted" data-bs-toggle="tooltip" data-bs-placement="right" title="The percentile of the current score, the proportion of all scored vulnerabilities with the same or a lower EPSS score"></span>
<span id="epss-percentile" style="text-decoration:underline dotted" data-bs-toggle="tooltip" data-bs-placement="right" title="The percentile of the current score, the proportion of all scored vulnerabilities with the same or a lower EPSS score."></span>
</div>
</div>
{% if vulnerability_data['containers']['cna']['title'] %}
Expand Down Expand Up @@ -264,13 +264,41 @@ <h6 class="card-subtitle mb-2 text-body-secondary">
<table class="table table-borderless table-hover">
<thead>
<tr data-bs-toggle="collapse" data-bs-target="#collapseProductTable{{ vulnerability_id }}" aria-expanded="false" aria-controls="collapseProductTable{{ vulnerability_id }}">
<th scope="col" style="width: 20px;"><span class="chevron" ></span></th><th scope="col">Vendor</th><th scope="col">Product</th>
<th scope="col" style="width: 20px;"><span class="chevron" ></span></th>
<th scope="col">Vendor</th>
<th scope="col">Product</th>
<th scope="col">Version</th>
</tr>
</thead>
<tbody class="collapse" id="collapseProductTable{{ vulnerability_id }}">
{% for elem in vulnerability_data['containers']['cna']['affected'] %}
<tr>
<td></td><td><a href="{{ url_for('home_bp.search', vendor=elem['vendor']) }}">{{ elem['vendor'] }}</a></td><td><a href="{{ url_for('home_bp.search', vendor=elem['vendor'], product=elem['product']) }}">{{ elem['product'] }}</a></td>
<td></td>
<td><a href="{{ url_for('home_bp.search', vendor=elem['vendor']) }}">{{ elem['vendor'] }}</a></td>
<td><a href="{{ url_for('home_bp.search', vendor=elem['vendor'], product=elem['product']) }}">{{ elem['product'] }}</a></td>
<td>
{% for version in elem['versions'] %}

{% if version['status']=='affected' %}
{% if version['versionType'] == 'semver' %}
<b>Version:</b> {{ version['version'] }} &nbsp;&nbsp;<b>&leq;</b> {{ version['lessThanOrEqual'] }}<br />
{% elif version['versionType'] == 'custom' %}
<b>Version:</b> {{ version['version'] }} &nbsp;&nbsp;<b>&lt;</b> {{ version['lessThan'] }}<br />
{% else %}
<b>Version:</b> {{ version['version'] }}<br />
{% endif %}

{% elif version['status']=='unaffected' %}
{% if version['versionType'] == 'custom' %}
<b>Patch:</b> {{ version['version'] }}<br />
{% endif %}
{% endif %}
{% endfor %}

{% for cpe in elem['cpes'] %}
&nbsp;&nbsp;&nbsp;&nbsp;{{ cpe }}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit 5f9826a

Please sign in to comment.