Class: CVESchema::CVE::Impact::CVSSv3::EM
- Inherits:
-
Object
- Object
- CVESchema::CVE::Impact::CVSSv3::EM
- Defined in:
- lib/cve_schema/cve/impact/cvss_v3.rb
Constant Summary collapse
- CR =
{'X' => :X, 'H' => :H, 'M' => :M, 'L' => :L}
- IR =
{'X' => :X, 'H' => :H, 'M' => :M, 'L' => :L}
- AR =
{'X' => :X, 'H' => :H, 'M' => :M, 'L' => :L}
- MAV =
{'N' => :N, 'A' => :A, 'L' => :L, 'P' => :P}
- MAC =
{'L' => :L, 'H' => :H}
- MPR =
{'N' => :N, 'L' => :L, 'H' => :H}
- MUI =
{'N' => :N, 'R' => :R}
- MS =
{'U' => :S, 'C' => :C}
- MC =
{'H' => :H, 'L' => :L, 'N' => :N}
- MI =
{'H' => :H, 'L' => :L, 'N' => :N}
- MA =
{'H' => :H, 'L' => :L, 'N' => :N}
Instance Attribute Summary collapse
-
#ar ⇒ :X, ...
readonly
Security Requirements Availability.
-
#cr ⇒ :X, ...
readonly
Security Requirements Confidentiality.
-
#ir ⇒ :X, ...
readonly
Security Requirements Integrity.
-
#ma ⇒ :H, ...
readonly
The Modified Availability Impact.
-
#mac ⇒ :L, :H
readonly
The Modified Attack Complexity.
-
#mav ⇒ :N, ...
readonly
The Modified Attack Vector.
-
#mc ⇒ :H, ...
readonly
The Modified Confidentiality Impact.
-
#mi ⇒ :H, ...
readonly
The Modified Integrity Impact.
-
#mpr ⇒ :N, ...
readonly
The Modified Privileges Required.
-
#ms ⇒ :U, :C
readonly
The Modified Scope.
-
#mui ⇒ :N, :R
readonly
The Modified User Interaction.
Class Method Summary collapse
-
.from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to a Symbol Hash for #initialize.
-
.load(json) ⇒ EM
Loads the EM object from the parsed JSON.
Instance Method Summary collapse
-
#initialize(cr: nil, ir: nil, ar: nil, mav: nil, mac: nil, mpr: nil, mui: nil, ms: nil, mc: nil, mi: nil, ma: nil) ⇒ EM
constructor
Initializes the EM object.
Constructor Details
#initialize(cr: nil, ir: nil, ar: nil, mav: nil, mac: nil, mpr: nil, mui: nil, ms: nil, mc: nil, mi: nil, ma: nil) ⇒ EM
Initializes the EM object.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 282 def initialize(cr: nil, ir: nil, ar: nil, mav: nil, mac: nil, mpr: nil, mui: nil, ms: nil, mc: nil, mi: nil, ma: nil) @cr = cr @ir = ir @ar = ar @mav = mav @mac = mac @mpr = mpr @mui = mui @ms = ms @mc = mc @mi = mi @ma = ma end |
Instance Attribute Details
#ar ⇒ :X, ... (readonly)
Security Requirements Availability.
221 222 223 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 221 def ar @ar end |
#cr ⇒ :X, ... (readonly)
Security Requirements Confidentiality.
207 208 209 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 207 def cr @cr end |
#ir ⇒ :X, ... (readonly)
Security Requirements Integrity.
214 215 216 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 214 def ir @ir end |
#ma ⇒ :H, ... (readonly)
The Modified Availability Impact.
277 278 279 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 277 def ma @ma end |
#mac ⇒ :L, :H (readonly)
The Modified Attack Complexity.
235 236 237 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 235 def mac @mac end |
#mav ⇒ :N, ... (readonly)
The Modified Attack Vector.
228 229 230 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 228 def mav @mav end |
#mc ⇒ :H, ... (readonly)
The Modified Confidentiality Impact.
263 264 265 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 263 def mc @mc end |
#mi ⇒ :H, ... (readonly)
The Modified Integrity Impact.
270 271 272 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 270 def mi @mi end |
#mpr ⇒ :N, ... (readonly)
The Modified Privileges Required.
242 243 244 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 242 def mpr @mpr end |
#ms ⇒ :U, :C (readonly)
The Modified Scope.
256 257 258 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 256 def ms @ms end |
#mui ⇒ :N, :R (readonly)
The Modified User Interaction.
249 250 251 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 249 def mui @mui end |
Class Method Details
.from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to a Symbol Hash for #initialize.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 306 def self.from_json(json) { cr: CR[json['CR']], ir: IR[json['IR']], ar: AR[json['AR']], mav: MAV[json['MAV']], mac: MAC[json['MAC']], mpr: MPR[json['MPR']], mui: MUI[json['MUI']], ms: MS[json['MS']], mc: MC[json['MC']], mi: MI[json['MI']], ma: MA[json['MA']] } end |
.load(json) ⇒ EM
Loads the EM object from the parsed JSON.
331 332 333 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 331 def self.load(json) new(**from_json(json)) end |