-
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
49 changed files
with
1,168 additions
and
213 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
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
28 changes: 28 additions & 0 deletions
28
component_catalog/migrations/0007_vulnerability_fixed_packages_count_and_more.py
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,28 @@ | ||
# Generated by Django 5.0.6 on 2024-08-27 14:27 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('component_catalog', '0006_vulnerability_model_and_missing_indexes'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='vulnerability', | ||
name='fixed_packages_count', | ||
field=models.GeneratedField(db_persist=True, expression=models.Func(models.F('fixed_packages'), function='jsonb_array_length'), output_field=models.IntegerField()), | ||
), | ||
migrations.AddField( | ||
model_name='vulnerability', | ||
name='max_score', | ||
field=models.FloatField(blank=True, help_text='The maximum score of the range.', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='vulnerability', | ||
name='min_score', | ||
field=models.FloatField(blank=True, help_text='The minimum score of the range.', null=True), | ||
), | ||
] |
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
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 mb-0"> | ||
{% 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> |
Oops, something went wrong.