Skip to content

Commit

Permalink
FIX Invalid CVSS computation (6.1.9) test
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jan 27, 2025
1 parent 423ac80 commit f71a6a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/CSAF/Validator/MandatoryTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ sub TEST_6_1_9 {

foreach my $score (@scores) {

if ($cvss_v2->$score && $cvss->$score != $cvss_v2->$score) {
if (($cvss_v2->$score && $cvss->$score) && ($cvss->$score != $cvss_v2->$score)) {
$self->add_message(
category => 'mandatory',
path => "/vulnerabilities/$vuln_idx/score/$score_idx/cvss_v2",
Expand Down Expand Up @@ -604,7 +604,7 @@ sub TEST_6_1_9 {

foreach my $score (@scores) {

if ($cvss_v3->$score && $cvss->$score != $cvss_v3->$score) {
if (($cvss_v3->$score && $cvss->$score) && ($cvss->$score != $cvss_v3->$score)) {
$self->add_message(
category => 'mandatory',
path => "/vulnerabilities/$vuln_idx/score/$score_idx/cvss_v3",
Expand All @@ -617,7 +617,7 @@ sub TEST_6_1_9 {

foreach my $severity (@severities) {

if ($cvss_v3->$severity && $cvss->$severity ne $cvss_v3->$severity) {
if (($cvss_v3->$severity && $cvss->$severity) && ($cvss->$severity ne $cvss_v3->$severity)) {
$self->add_message(
category => 'mandatory',
path => "/vulnerabilities/$vuln_idx/score/$score_idx/cvss_v3",
Expand Down

0 comments on commit f71a6a7

Please sign in to comment.