Skip to content

Commit

Permalink
Fix: Show CVSS value "10.0" correctly in charts
Browse files Browse the repository at this point in the history
The value "10.0" is now shown instead of the invalid range
"10.0 - 10.9" in the charts, e.g. in the bar tooltip of
"Results by CVSS".
  • Loading branch information
timopollmeier authored and bjoernricks committed Aug 8, 2023
1 parent 911c722 commit c6ddd97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/web/components/dashboard/display/cvss/cvsstransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ const transformCvssData = (data = {}) => {
let toolTip;
let filterValue;

if (value > 0) {
if (value === 10) {
filterValue = {
start: value,
};
toolTip = `10.0 (${label}): ${perc}% (${count})`;
} else if (value > 0) {
filterValue = {
start: format(value - 0.1),
end: format(value + 1),
Expand Down

0 comments on commit c6ddd97

Please sign in to comment.