Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CVSS V4 #503

Closed

Conversation

ColonelThirtyTwo
Copy link
Collaborator

Add separate fields for CVSS V4 - place who want to use CVSS V3 can continue to do so and ignore the V4 fields.

Add a CVSS V4 calculator, from Red Hat's code, but refactored to use local variables. The calculators are in separate dialogs, so users may hide whichever one they are not using.

Places where a score is used (ex sorting or the finding list) will use either score, with a preference for v4 if both are specified.

NOTE: I haven't tested the Hasura settings yet.

Alternate design: Could use the existing cvss_score/vector fields instead - show only one calculator based on the CVSS vector prefix or if the user selects the other one.

Add separate fields for CVSS V4 - place who want to use CVSS V3 can
continue to do so and ignore the V4 fields.

Add a CVSS V4 calculator, from Red Hat's code, but refactored to use
local variables. The calculators are in separate dialogs, so users
may hide whichever one they are not using.

Places where a score is used (ex sorting or the finding list) will use
either score, with a preference for v4 if both are specified.
@@ -223,7 +237,7 @@ class Finding(models.Model):
extra_fields = models.JSONField(default=dict)

class Meta:
ordering = ["severity", "-cvss_score", "finding_type", "title"]
ordering = ["severity", Coalesce("cvss_v4_score", "cvss_score").desc(nulls_last=True), "finding_type", "title"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions don't work in Django pre-4.1 due to a bug, and indeed this breaks the findings list page.

@ColonelThirtyTwo
Copy link
Collaborator Author

Going with #509 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant