@@ -618,9 +618,15 @@ export default {
618618 this .cvssv2Vector .c = vector .C ;
619619 this .cvssv2Vector .i = vector .I ;
620620 this .cvssv2Vector .a = vector .A ;
621- this .cvssV2Score .baseScore = this .vulnerability .cvssV2BaseScore ;
622- this .cvssV2Score .impactSubScore = this .vulnerability .cvssV2ImpactSubScore ;
623- this .cvssV2Score .exploitabilitySubScore = this .vulnerability .cvssV2ExploitabilitySubScore ;
621+ if (this .vulnerability .cvssV2BaseScore
622+ && this .vulnerability .cvssV2ImpactSubScore
623+ && this .vulnerability .cvssV2ExploitabilitySubScore ) {
624+ this .cvssV2Score .baseScore = this .vulnerability .cvssV2BaseScore ;
625+ this .cvssV2Score .impactSubScore = this .vulnerability .cvssV2ImpactSubScore ;
626+ this .cvssV2Score .exploitabilitySubScore = this .vulnerability .cvssV2ExploitabilitySubScore ;
627+ } else {
628+ this .retrieveCvssScore (this .vulnerability .cvssV2Vector , 2 );
629+ }
624630 }
625631 return vector;
626632 },
@@ -639,9 +645,15 @@ export default {
639645 this .cvssv3Vector .c = vector .C ;
640646 this .cvssv3Vector .i = vector .I ;
641647 this .cvssv3Vector .a = vector .A ;
642- this .cvssV3Score .baseScore = this .vulnerability .cvssV3BaseScore ;
643- this .cvssV3Score .impactSubScore = this .vulnerability .cvssV3ImpactSubScore ;
644- this .cvssV3Score .exploitabilitySubScore = this .vulnerability .cvssV3ExploitabilitySubScore ;
648+ if (this .vulnerability .cvssV3BaseScore
649+ && this .vulnerability .cvssV3ImpactSubScore
650+ && this .vulnerability .cvssV3ExploitabilitySubScore ) {
651+ this .cvssV3Score .baseScore = this .vulnerability .cvssV3BaseScore ;
652+ this .cvssV3Score .impactSubScore = this .vulnerability .cvssV3ImpactSubScore ;
653+ this .cvssV3Score .exploitabilitySubScore = this .vulnerability .cvssV3ExploitabilitySubScore ;
654+ } else {
655+ this .retrieveCvssScore (this .vulnerability .cvssV3Vector , 3 );
656+ }
645657 }
646658 return vector;
647659 },
0 commit comments