cvss-suite icon indicating copy to clipboard operation
cvss-suite copied to clipboard

undefined method base_score error for CVSS 4.0 vector string

Open mpurusottamc opened this issue 6 months ago • 0 comments

I am trying to calculate score & severity for a CVSS 4.0 vector string and getting the below error:

 undefined method `base_score' for #<CvssSuite::Cvss40:0x0000000321f3f510

Here's the code:

vector_string="CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:L/VI:L/VA:L/SC:H/SI:H/SA:L/E:A/CR:M/IR:H/AR:L/MAV:A/MAC:H/MAT:P/MPR:L/MUI:P/MVC:L/MVI:L/MVA:L/MSC:L/MSI:H/MSA:S/S:P/AU:Y/R:U/V:C/RE:M/U:Green"
cvss = CvssSuite.new(vector_string)

I do see cvss object has overall_score. but, base_score, temporal_score and environmental_score throw the same error.

Your environment

  • version of cvss-suite gem - 3.2.2
  • version of ruby - ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]

I was hoping it would return values for all score variables.

mpurusottamc avatar Aug 16 '24 20:08 mpurusottamc