Skip to content

Commit

Permalink
fix: use CvssV4
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Dec 7, 2024
1 parent 2b21c7b commit fe3ad9b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ public int compareTo(@NotNull Vulnerability o) {
* vulnerability severity
*/
private Double bestEffortSeverityLevelForSorting() {
if (this.cvssV4 != null) {
return SeverityUtil.sortAdjustedCVSSv3BaseScore(this.cvssV4.getCvssData().getBaseScore());
}
if (this.cvssV3 != null) {
return SeverityUtil.sortAdjustedCVSSv3BaseScore(this.cvssV3.getCvssData().getBaseScore());
}
Expand All @@ -535,6 +538,9 @@ private Double bestEffortSeverityLevelForSorting() {
* unscored severities that critical is assumed.
*/
public String getHighestSeverityText() {
if (this.cvssV4 != null) {
return this.cvssV4.getCvssData().getBaseSeverity().value().toUpperCase();
}
if (this.cvssV3 != null) {
return this.cvssV3.getCvssData().getBaseSeverity().value().toUpperCase();
}
Expand Down

0 comments on commit fe3ad9b

Please sign in to comment.