forked from aboutcode-org/vulnerablecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvulnerabilities.html
More file actions
65 lines (55 loc) · 2.03 KB
/
Copy pathvulnerabilities.html
File metadata and controls
65 lines (55 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{% extends 'base.html' %}
{% block title %}
<h1 class="title">
Explore Vulnerabilities
</h1>
{% endblock %}
{% block content %}
<div class="columns">
<div class="column is-one-third is-offset-one-third">
<form action="{% url 'vulnerability_search' %}" method="get">
{% load widget_tweaks %}
<div class="field is-horizontal">
{{form.vuln_id|add_class:"input"}}
<button class="button is-success", type="submit">
Search
</button>
</div>
</form>
</div>
</div>
{% if vulnerabilities %}
<section class="section is-medium has-text-centered">
<div class="container">
<h1 class="title" id="results">Results of your query "{{searched_for}}"</h1>
<h3 class="subtitle" id="results">Total {{result_size}} results</h3>
</div>
</section>
<section class="section has-background-dark">
<div class="content is-large">
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
<tr>
<th>Vulnerabilities</th>
<th>Patched packages</th>
<th>Vulnerable packages</th>
</tr>
{% for vulnerability in vulnerabilities %}
<tr>
<td><a href="{% url 'vulnerability_view' vulnerability.pk %}">{{vulnerability.cve_id}}</a></td>
<td>{{vulnerability.resolved_to.all|length}}</td>
<td>{{vulnerability.vulnerable_to.all|length}}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="is-field is-horizontal">
{% if vulnerabilities.has_previous %}
<a class="button" href="?vuln_id={{ searched_for }}&page={{ vulnerabilities.previous_page_number }}">Previous Page</a>
{% endif %}
{% if vulnerabilities.has_next %}
<a class="button" href="?vuln_id={{ searched_for }}&page={{ vulnerabilities.next_page_number}}">Next Page</a>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}