-
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.
Store and display new
Package.risk_score
field in the UI (#194)
* Add a risk_score field and display the values in the UI #98 Signed-off-by: tdruez <[email protected]> * Generate random value for the risk_score #98 Signed-off-by: tdruez <[email protected]> * Remove temp data migration #98 Signed-off-by: tdruez <[email protected]> * CSS adjustments #98 Signed-off-by: tdruez <[email protected]> * Rename fetch_for_queryset to fetch_for_packages #98 Signed-off-by: tdruez <[email protected]> * Add exploitability, weighted_severity, risk_score on Vulnerability #98 Signed-off-by: tdruez <[email protected]> * Display new fields in Vulnerabilities tab #98 Signed-off-by: tdruez <[email protected]> * Display new fields in Vulnerabilities lists #98 Signed-off-by: tdruez <[email protected]> * Refine the Risk badge rendering #98 Signed-off-by: tdruez <[email protected]> * Add filter for all new fields #98 Signed-off-by: tdruez <[email protected]> * Sort the vulnerability by risk in listing #98 Signed-off-by: tdruez <[email protected]> * Remove the min_score and max_score attributes from model #98 Signed-off-by: tdruez <[email protected]> * Add help text in Inventory tab headers #98 Signed-off-by: tdruez <[email protected]> * Remove dead code #98 Signed-off-by: tdruez <[email protected]> * Set proper choices for the exploitability filter #98 Signed-off-by: tdruez <[email protected]> * Consolidate migrations #98 Signed-off-by: tdruez <[email protected]> * Fix part of the failing tests #98 Signed-off-by: tdruez <[email protected]> * Add migration files #98 Signed-off-by: tdruez <[email protected]> * Fix failing tests #98 Signed-off-by: tdruez <[email protected]> * Refine the DecimalField and exploitability label system #98 Signed-off-by: tdruez <[email protected]> * Refine the display of exploitability #98 Signed-off-by: tdruez <[email protected]> * Update risk_score help_text #98 Signed-off-by: tdruez <[email protected]> * Display the risk_score as badge in Package vulnerabilities tab #98 Signed-off-by: tdruez <[email protected]> * Update the risk_score on package in fetch_for_packages #98 Signed-off-by: tdruez <[email protected]> * Set proper max_digits to 2 for exploitability #98 Signed-off-by: tdruez <[email protected]> * Fix issue with the new filters #98 Signed-off-by: tdruez <[email protected]> * Render exploitability as a badge #98 Signed-off-by: tdruez <[email protected]> * Add unit test for the risk_score filter in Inventory tab #98 Signed-off-by: tdruez <[email protected]> * Consolidate migration files #98 Signed-off-by: tdruez <[email protected]> * Add changelog entry Signed-off-by: tdruez <[email protected]> * Add support for update in fetch_for_packages #98 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]>
- Loading branch information
Showing
34 changed files
with
468 additions
and
221 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
23 changes: 23 additions & 0 deletions
23
component_catalog/migrations/0010_component_risk_score_package_risk_score.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,23 @@ | ||
# Generated by Django 5.0.9 on 2024-11-18 10:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('component_catalog', '0009_componentaffectedbyvulnerability_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='component', | ||
name='risk_score', | ||
field=models.DecimalField(blank=True, decimal_places=1, help_text='Risk score between 0.0 and 10.0, where higher values indicate greater vulnerability risk for the package.', max_digits=3, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='package', | ||
name='risk_score', | ||
field=models.DecimalField(blank=True, decimal_places=1, help_text='Risk score between 0.0 and 10.0, where higher values indicate greater vulnerability risk for the package.', max_digits=3, 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
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
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 |
---|---|---|
|
@@ -66,6 +66,7 @@ | |
"project_uuid", | ||
"default_assignee", | ||
"affected_by_vulnerabilities", | ||
"risk_score", | ||
] | ||
|
||
|
||
|
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
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
Oops, something went wrong.