class CVESchema::CVE::Impact::CVSSv2::BM
Constants
- A
- AC
- AU
- AV
- C
- I
Attributes
a[R]
The Availability impact.
@return [:N, :P, :C]
ac[R]
The Access Complexity.
@return [:H, :M, :L]
au[R]
The Authentication
@return [:M, :S, :N]
av[R]
The Access Vector.
@return [:L, :A, :N]
c[R]
The Confidentiality impact.
@return [:N, :P, :C]
i[R]
The Integrity impact.
@return [:N, :P, :C]
score[R]
The CVSSv2
Base Metrics Group score assuming all elements are present.
@return [String]
Public Class Methods
from_json(json)
click to toggle source
Maps the parsed JSON to a Symbol Hash for {#initialize}.
@param [Hash{String => Object}] json
The parsed JSON.
@return [Hash{Symbol => Object}]
The mapped Symbol Hash.
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 76 def self.from_json(json) { av: AV[json['AV']], ac: AC[json['AC']], au: AU[json['AU']], c: C[json['C']], i: I[json['I']], a: A[json['A']], score: json['SCORE'] } end
load(json)
click to toggle source
Loads the BM
object from the parsed JSON.
@param [Hash{String => Object}] json
The parsed JSON.
@return [self]
The loaded BM object.
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 98 def self.load(json) new(**from_json(json)) end
new(av: nil, ac: nil, au: nil, c: nil, i: nil, a: nil, score: nil)
click to toggle source
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 57 def initialize(av: nil, ac: nil, au: nil, c: nil, i: nil, a: nil, score: nil) @av = av @ac = ac @c = c @i = i @a = a @score = score end