-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tdruez <tdruez@nexb.com>
- Loading branch information
Showing
9 changed files
with
163 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
component_catalog/templates/component_catalog/includes/vulnerability_aliases.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<ul class="list-unstyled"> | ||
{% for alias in aliases %} | ||
<li> | ||
{% if alias|slice:":3" == "CVE" %} | ||
<a href="https://nvd.nist.gov/vuln/detail/{{ alias }}" target="_blank">{{ alias }} | ||
<i class="fa-solid fa-up-right-from-square mini"></i> | ||
</a> | ||
{% elif alias|slice:":4" == "GHSA" %} | ||
<a href="https://github.com/advisories/{{ alias }}" target="_blank">{{ alias }} | ||
<i class="fa-solid fa-up-right-from-square mini"></i> | ||
</a> | ||
{% elif alias|slice:":3" == "NPM" %} | ||
<a href="https://github.com/nodejs/security-wg/blob/main/vuln/npm/{{ alias|slice:"4:" }}.json" target="_blank">{{ alias }} | ||
<i class="fa-solid fa-up-right-from-square mini"></i> | ||
</a> | ||
{% else %} | ||
{{ alias }} | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> |
34 changes: 34 additions & 0 deletions
34
component_catalog/templates/component_catalog/includes/vulnerability_list_table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% load i18n %} | ||
{% load inject_preserved_filters from dje_tags %} | ||
{% load urlize_target_blank from dje_tags %} | ||
{% load naturaltime_short from dje_tags %} | ||
|
||
<table id="object-list-table" class="table table-bordered table-striped table-md table-fixed-layout text-break vulnerabilities-table"> | ||
{% include 'includes/object_list_table_header.html' %} | ||
<tbody> | ||
{% for vulnerability in object_list %} | ||
<tr> | ||
<td> | ||
<strong> | ||
{# TODO #} | ||
<a href="{{ values.vulnerablecode_url }}vulnerabilities/{{ vulnerability.vulnerability_id }}" target="_blank"> | ||
{{ vulnerability.vulnerability_id }} | ||
<i class="fa-solid fa-up-right-from-square mini"></i> | ||
</a> | ||
</strong> | ||
</td> | ||
<td> | ||
{% include 'component_catalog/includes/vulnerability_aliases.html' with aliases=vulnerability.aliases only %} | ||
</td> | ||
<td> | ||
{{ vulnerability.affected_packages_count }} | ||
</td> | ||
<td> | ||
{{ vulnerability.fixed_packages_length }} | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr><td colspan="10">No results.</td></tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
component_catalog/templates/component_catalog/vulnerability_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends 'object_list_base.html' %} | ||
{% load i18n %} | ||
|
||
{% block page_title %}{% trans "Vulnerabilities" %}{% endblock %} | ||
|
||
{% block nav-list-head %} | ||
{{ block.super }} | ||
<li class="nav-item mt-1 ms-3"> | ||
<form class="form-search"> | ||
<div class="input-group input-group-sm"> | ||
<input type="text" class="form-control" name="q" value="{{ search_query|default_if_none:'' }}" aria-label="Search"> | ||
<button class="btn btn-outline-dark" type="submit">Search</button> | ||
</div> | ||
</form> | ||
</li> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters