Skip to content

Commit 3c9ac0a

Browse files
committed
Adjust according to rebased changes
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent dc2d70b commit 3c9ac0a

4 files changed

Lines changed: 20 additions & 27 deletions

File tree

vulnerabilities/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ def get_cwes(self):
496496

497497
Database.get_cwes = get_cwes
498498

499+
499500
def get_cwes(self):
500501
"""Yield CWE Weakness objects"""
501502
for cwe_category in self.cwe_files:

vulnerabilities/templates/vulnerability_details.html

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@
4040
</span>
4141
</a>
4242
</li>
43-
<li data-tab="severities">
44-
<a>
45-
<span>
46-
Severities ({{ severities|length }})
47-
</span>
48-
</a>
49-
</li>
5043
<li data-tab="references">
5144
<a>
5245
<span>
@@ -239,16 +232,25 @@
239232
</thead>
240233
{% for ref in references %}
241234
<tr>
242-
<th style="width: 160px;"> System </th>
243-
<th style="width: 100px;"> Score </th>
244-
<th> Found at </th>
235+
{% if ref.reference_id %}
236+
<td class="wrap-strings">{{ ref.reference_id }}</td>
237+
{% else %}
238+
<td></td>
239+
{% endif %}
240+
241+
{% if ref.reference_type %}
242+
<td class="wrap-strings">{{ ref.get_reference_type_display }}</td>
243+
{% else %}
244+
<td></td>
245+
{% endif %}
246+
247+
<td class="wrap-strings"><a href="{{ ref.url }}" target="_blank">{{ ref.url }}<i
248+
class="fa fa-external-link fa_link_custom"></i></a></td>
245249
</tr>
246-
{% for severity in severities %}
250+
{% empty %}
247251
<tr>
248-
<td class="wrap-strings">{{ severity.scoring_system }}</td>
249-
<td class="wrap-strings">{{ severity.value }}</td>
250-
<td class="wrap-strings"><a href="{{ severity.url }}" target="_blank">
251-
{{ severity.url }}<i class="fa fa-external-link fa_link_custom"></i></a>
252+
<td colspan="2">
253+
There are no known references.
252254
</td>
253255
</tr>
254256
{% endfor %}
@@ -543,7 +545,6 @@
543545
<p>No EPSS data available for this vulnerability.</p>
544546
{% endif %}
545547
</div>
546-
</div>
547548

548549
<div class="tab-div content" data-content="history">
549550
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
@@ -613,4 +614,4 @@
613614
}
614615
</script>
615616

616-
{% endblock %}
617+
{% endblock %}

vulnerabilities/templates/vulnerability_package_details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@
8585
}
8686
</script>
8787

88-
{% endblock %}
88+
{% endblock %}

vulnerabilities/views.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,6 @@ def get_context_data(self, **kwargs):
234234
"published_at": epss_severity.published_at,
235235
}
236236

237-
epss_severity = vulnerability.severities.filter(scoring_system="epss").first()
238-
epss_data = None
239-
if epss_severity:
240-
epss_data = {
241-
"percentile": epss_severity.scoring_elements,
242-
"score": epss_severity.value,
243-
"published_at": epss_severity.published_at,
244-
}
245-
246237
context.update(
247238
{
248239
"vulnerability": vulnerability,

0 commit comments

Comments
 (0)