lib/cvss_suite/cvss3/cvss3_base.rb in cvss-suite-3.0.1 vs lib/cvss_suite/cvss3/cvss3_base.rb in cvss-suite-3.1.0

- old
+ new

@@ -49,43 +49,43 @@ private def init_properties @properties.push(@attack_vector = - CvssProperty.new(name: 'Attack Vector', abbreviation: 'AV', position: [0], + CvssProperty.new(name: 'Attack Vector', abbreviation: 'AV', values: [{ name: 'Network', abbreviation: 'N', weight: 0.85 }, { name: 'Adjacent', abbreviation: 'A', weight: 0.62 }, { name: 'Local', abbreviation: 'L', weight: 0.55 }, { name: 'Physical', abbreviation: 'P', weight: 0.2 }])) @properties.push(@attack_complexity = - CvssProperty.new(name: 'Attack Complexity', abbreviation: 'AC', position: [1], + CvssProperty.new(name: 'Attack Complexity', abbreviation: 'AC', values: [{ name: 'Low', abbreviation: 'L', weight: 0.77 }, { name: 'High', abbreviation: 'H', weight: 0.44 }])) @properties.push(@privileges_required = - CvssProperty.new(name: 'Privileges Required', abbreviation: 'PR', position: [2], + CvssProperty.new(name: 'Privileges Required', abbreviation: 'PR', values: [{ name: 'None', abbreviation: 'N', weight: 0.85 }, { name: 'Low', abbreviation: 'L', weight: 0.62 }, { name: 'High', abbreviation: 'H', weight: 0.27 }])) @properties.push(@user_interaction = - CvssProperty.new(name: 'User Interaction', abbreviation: 'UI', position: [3], + CvssProperty.new(name: 'User Interaction', abbreviation: 'UI', values: [{ name: 'None', abbreviation: 'N', weight: 0.85 }, { name: 'Required', abbreviation: 'R', weight: 0.62 }])) @properties.push(@scope = - CvssProperty.new(name: 'Scope', abbreviation: 'S', position: [4], + CvssProperty.new(name: 'Scope', abbreviation: 'S', values: [{ name: 'Unchanged', abbreviation: 'U' }, { name: 'Changed', abbreviation: 'C' }])) @properties.push(@confidentiality = - CvssProperty.new(name: 'Confidentiality', abbreviation: 'C', position: [5], + CvssProperty.new(name: 'Confidentiality', abbreviation: 'C', values: [{ name: 'None', abbreviation: 'N', weight: 0.0 }, { name: 'Low', abbreviation: 'L', weight: 0.22 }, { name: 'High', abbreviation: 'H', weight: 0.56 }])) @properties.push(@integrity = - CvssProperty.new(name: 'Integrity', abbreviation: 'I', position: [6], + CvssProperty.new(name: 'Integrity', abbreviation: 'I', values: [{ name: 'None', abbreviation: 'N', weight: 0.0 }, { name: 'Low', abbreviation: 'L', weight: 0.22 }, { name: 'High', abbreviation: 'H', weight: 0.56 }])) @properties.push(@availability = - CvssProperty.new(name: 'Availability', abbreviation: 'A', position: [7], + CvssProperty.new(name: 'Availability', abbreviation: 'A', values: [{ name: 'None', abbreviation: 'N', weight: 0.0 }, { name: 'Low', abbreviation: 'L', weight: 0.22 }, { name: 'High', abbreviation: 'H', weight: 0.56 }])) end end