-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy pathpackage_details.html
More file actions
337 lines (323 loc) · 19.5 KB
/
package_details.html
File metadata and controls
337 lines (323 loc) · 19.5 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
{% extends "base.html" %}
{% load humanize %}
{% load widget_tweaks %}
{% load static %}
{% load url_filters %}
{% block title %}
VulnerableCode Package Details - {{ package.purl }}
{% endblock %}
{% block content %}
<section class="section pt-0">
{% include "package_search_box.html"%}
</section>
{% if package %}
<section class="section pt-0">
<div class="details-container">
<article class="panel is-info panel-header-only">
<div class="panel-heading py-2 is-size-6">
Package details: <span class="tag is-white custom">
{{ package.purl }}
</span>
</div>
</article>
<div class="tabs is-boxed" id="tabs">
<ul>
<li class="is-active" data-tab="essentials">
<a>
<span>Essentials</span>
</a>
</li>
<li data-tab="history">
<a>
<span>
History ({{ history|length }})
</span>
</a>
</li>
</ul>
</div>
<div id="tab-content">
<div class="tab-div is-active" data-content="essentials">
<div class="tab-nested-div mb-1 pb-0">
{% if affected_by_vulnerabilities|length != 0 %}
<div class="pl-3 pr-3 mb-5 floating-purl pb-0">
{% else %}
<div class="pl-3 pr-3 mb-5 floating-purl pb-2">
{% endif %}
<table class="table vcio-table width-100-pct mt-2">
<tbody>
<tr>
<td class="two-col-left">
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The package url or purl is a URL string used to identify and locate a software package.">
purl
</span>
</td>
<td class="two-col-right">
{{ fixed_package_details.purl.to_string }}
</td>
</tr>
{% if package.is_ghost %}
<tr>
<td class="two-col-left">
Tags
</td>
<td class="two-col-right">
<span
class="tag is-warning is-hoverablem has-tooltip-multiline has-tooltip-black"
data-tooltip="This package does not exist in the upstream package manager or its repository."
style="margin-right: 8px;">
Ghost
</span>
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% if affected_by_vulnerabilities|length != 0 %}
<div class="pl-3 pr-3 mb-6 non-vuln pb-0">
<table class="table vcio-table width-100-pct">
<tbody>
<tr>
<td class="two-col-left">
Next non-vulnerable version
</td>
<td class="two-col-right">
{% if fixed_package_details.next_non_vulnerable.version %}
<a href="/packages/{{ fixed_package_details.next_non_vulnerable|url_quote }}?search={{ fixed_package_details.next_non_vulnerable }}"
target="_self">{{ fixed_package_details.next_non_vulnerable.version }}</a>
{% else %}
<span class="emphasis-vulnerable">None.</span>
{% endif %}
</td>
</tr>
<tr>
<td class="two-col-left">
Latest non-vulnerable version
</td>
<td class="two-col-right">
{% if fixed_package_details.latest_non_vulnerable.version %}
<a href="/packages/{{ fixed_package_details.latest_non_vulnerable|url_quote }}?search={{ fixed_package_details.latest_non_vulnerable }}"
target="_self">{{ fixed_package_details.latest_non_vulnerable.version }}</a>
{% else %}
<span class="emphasis-vulnerable">None.</span>
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
<div class="content ml-3 mr-3 pb-1">
<div class="has-text-weight-bold ml-1 mb-0 pb-0">
Vulnerabilities affecting this package ({{ affected_by_vulnerabilities|length }})
</div>
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
<thead>
<tr>
<th style="width: 200px;">Vulnerability</th>
<th>Summary</th>
<th style="width: 310px;">Fixed by</th>
</tr>
</thead>
<tbody>
{% for vulnerability in affected_by_vulnerabilities %}
<tr>
<td>
<a href="{{ vulnerability.get_absolute_url }}" target="_self">{{vulnerability.vulnerability_id }}</a>
<br />
Aliases:
<br />
{% for alias in vulnerability.alias %}
{% if alias.url %}
<a href="{{ alias.url }}" target="_blank">{{ alias }}<i
class="fa fa-external-link fa_link_custom"></i></a>
<br />
{% else %}
{{ alias }}
<br />
{% endif %}
{% endfor %}
</td>
<td style="word-wrap: break-word; word-break: break-word;">
{{ vulnerability.summary }}
</td>
<td style="word-wrap: break-word; word-break: break-all;">
{% if package.purl == fixed_package_details.purl.to_string %}
{% for key, value in fixed_package_details.items %}
{% if key == "vulnerabilities" %}
{% for vuln in value %}
{% if vuln.vulnerability.vulnerability_id == vulnerability.vulnerability_id %}
{% if vuln.fixed_by_package_details is None %}
<span class="emphasis-vulnerable">There are no reported fixed by versions.</span>
{% else %}
{% for fixed_pkg in vuln.fixed_by_package_details %}
<section>
{% if fixed_pkg.fixed_by_purl_vulnerabilities|length == 0 %}
<a href="/packages/{{ fixed_pkg.fixed_by_purl|url_quote }}?search={{ fixed_pkg.fixed_by_purl }}"
target="_self">{{ fixed_pkg.fixed_by_purl.version }}</a>
<br />
<span class="emphasis-not-vulnerable">Affected by 0 other vulnerabilities.</span>
{% else %}
<a href="/packages/{{ fixed_pkg.fixed_by_purl|url_quote }}?search={{ fixed_pkg.fixed_by_purl }}"
target="_self">{{ fixed_pkg.fixed_by_purl.version }}</a>
{% if fixed_pkg.fixed_by_purl_vulnerabilities|length != 1 %}
<br />
<span class="emphasis-vulnerable">Affected by {{ fixed_pkg.fixed_by_purl_vulnerabilities|length }} other
vulnerabilities.</span>
{% else %}
<br />
<span class="emphasis-vulnerable">Affected by {{ fixed_pkg.fixed_by_purl_vulnerabilities|length }} other
vulnerability.</span>
{% endif %}
<div class="dropdown is-hoverable has-text-weight-normal is-right">
<div class="dropdown-trigger">
<i
class="fa fa-question-circle ml-0 fa-sm has-background-white has-text-link"></i>
</div>
<div class="dropdown-menu dropdown-vuln-list-width" id="dropdown-menu4"
role="menu">
<div class="dropdown-content dropdown-instructions-box-shadow">
<div class="dropdown-item">
<div style="max-height: 200px; overflow-y: auto;">
This version is affected by these other vulnerabilities:
<div style="padding-top: 5px;">
{% for fixed_by_vuln in fixed_pkg.fixed_by_purl_vulnerabilities %}
<div>
<a href="/vulnerabilities/{{ fixed_by_vuln.vulnerability_id }}"
target="_self">{{
fixed_by_vuln.vulnerability_id }}</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</section>
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="3">
<span class="emphasis-not-vulnerable">This package is not known to be affected by vulnerabilities.</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="content ml-3 mr-3 pb-0 mb-0">
<div class="has-text-weight-bold ml-1 mb-0 pb-0">
Vulnerabilities fixed by this package ({{ fixing_vulnerabilities|length }})
</div>
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
<thead>
<tr>
<th style="width: 200px;">Vulnerability</th>
<th>Summary</th>
<th style="width: 225px;">Aliases</th>
</tr>
</thead>
<tbody>
{% for vulnerability in fixing_vulnerabilities %}
<tr>
<td>
<a href="{{ vulnerability.get_absolute_url }}" target="_self">{{ vulnerability.vulnerability_id }}</a>
</td>
<td>
{{ vulnerability.summary }}
</td>
<td>
{% for alias in vulnerability.alias %}
{% if alias.url %}
<a href="{{ alias.url }}" target="_blank">{{ alias }}<i
class="fa fa-external-link fa_link_custom"></i></a>
<br />
{% else %}
{{ alias }}
<br />
{% endif %}
{% endfor %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="3">
This package is not known to fix vulnerabilities.
</td>
</tr>
{% endfor %}
</tbody>
</table>
<br />
</div>
</div>
</div>
<div class="tab-div content" data-content="history">
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
<thead>
<tr>
<th> <span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The date that the package was reported to be fixing or affected by the vulnerability.">
Date </span> </th>
<th>
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The process that reported this package is fixing or affected by">
Actor
</span>
</th>
<th> <span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="Fixing or Affected by"> Action </span> </th>
<th> <span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="Vulnerability fixed by or affecting the package."> Vulnerability </span>
</th>
<th>
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The public service that published the advisory or related information."> Source </span>
</th>
<th>
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The version of VulnerableCode that performed the action. ">
VulnerableCode Version
</span>
</th>
</tr>
</thead>
{% for log in history %}
<tr>
<td class="is-break-word wrap-strings">{{ log.get_iso_time }}</td>
<td class="is-break-word wrap-strings">{{ log.actor_name }}</td>
<td class="is-break-word wrap-strings">{{ log.get_action_type_label }}</td>
<td class="is-break-word wrap-strings"> <a href="/vulnerabilities/{{log.related_vulnerability}}"
target="_self">{{ log.related_vulnerability }}</a></td>
<td class="is-break-word wrap-strings"> <a href="{{ log.source_url }}"
target="_blank">{{log.source_url }}</a></td>
<td class="is-break-word wrap-strings"> {{ log.software_version }} </td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</section>
<script src="{% static 'js/main.js' %}" crossorigin="anonymous"></script>
{% endif %}
{% endblock %}