class NVD::JSONFeeds::Schema::CVSSv2
Represents the `“cvssV2”` value.
Constants
- ACCESS_COMPLEXITIES
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- ACCESS_VECTORS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- AUTHENTICATIONS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- CIAS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- CIA_REQUIREMENTS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- COLLATERAL_DAMAGE_POTENTIALS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- EXPLOITABILITIES
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- REMEDIATION_LEVELS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- REPORT_CONFIDENCES
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- TARGET_DISTRIBUTIONS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
- VERSIONS
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
Attributes
@return [:HIGH, :MEDIUM, :LOW]
@return [:NETWORK, :ADJACENT_NETWORK, :LOCAL]]
@return [:MULTIPLE, :SINGLE, :NONE]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [Float]
@return [:NONE, :LOW, :LOW_MEDIUM, :MEDIUM_HIGH, :HIGH, :NOT_DEFINED]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [Float, nil]
@return [:UNPROVEN, :PROOF_OF_CONCEPT, :FUNCTIONAL, :HIGH, :NOT_DEFINED]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [:NONE, :PARTIAL, :COMPLETE]
@return [:OFFICIAL_FIX, :TEMPORARY_FIX, :WORKAROUND, :UNAVAILABLE, :NOT_DEFINED]
@return [:UNCONFIRMED, :UNCORROBORATED, :CONFIRMED, :NOT_DEFINED]
@return [:NONE, :LOW, :MEDIUM, :HIGH, :NOT_DEFINED]
@return [Float, nil]
@return [String]
@return [:“2.0”]
Public Class Methods
Maps the parsed JSON to a Symbol Hash for {#initialize}.
@param [Hash{String => Object}] json
The parsed JSON.
@return [Hash{Symbol => Object}]
The Symbol Hash.
@see csrc.nist.gov/schema/nvd/feed/1.1-Beta/cvss-v2.0_beta.json
# File lib/nvd/json_feeds/schema/cvss_v2.rb, line 213 def self.from_json(json) { version: VERSIONS.fetch(json.fetch('version')), vector_string: json.fetch('vectorString'), access_vector: if (value = json['accessVector']) ACCESS_VECTORS.fetch(value) end, access_Complexity: if (value = json['accessComplexity']) ACCESS_COMPLEXITIES.fetch(value) end, authentication: if (value = json['authentication']) AUTHENTICATIONS.fetch(value) end, confidentiality_impact: if (value = json['confidentialityImpact']) CIAS.fetch(value) end, integrity_impact: if (value = json['integrityImpact']) CIAS.fetch(value) end, availability_impact: if (value = json['availabilityImpact']) CIAS.fetch(value) end, base_score: json.fetch('baseScore'), exploitability: if (value = json['exploitability']) EXPLOITABILITIES.fetch(value) end, remediation_level: if (value = json['remediationLevel']) REMEDIATION_LEVELS.fetch(value) end, report_confidence: if (value = json['reportConfidence']) REPORT_CONFIDENCES.fetch(value) end, temporal_score: json['temporalScore'], collateral_damage_potential: if (value = json['collateralDamagePotential']) COLLATERAL_DAMAGE_POTENTIALS.fetch(value) end, target_distribution: if (value = json['targetDistribution']) TARGET_DISTRIBUTIONS.fetch(value) end, confidentiality_requirement: if (value = json['confidentialityRequirement']) CIA_REQUIREMENTS.fetch(value) end, integrity_requirement: if (value = json['integrityRequirement']) CIA_REQUIREMENTS.fetch(value) end, availability_requirement: if (value = json['availabilityRequirement']) CIA_REQUIREMENTS.fetch(value) end, environmental_score: json['environmentalScore'] } end
Loads the CVSS v2 object from the parsed JSON.
@param [Hash{String => Object}] json
The parsed JSON.
@return [CVSSv2]
The CVSSv3 V2 object.
# File lib/nvd/json_feeds/schema/cvss_v2.rb, line 292 def self.load(json) new(**from_json(json)) end
Initializes the CVSS v2 object.
# File lib/nvd/json_feeds/schema/cvss_v2.rb, line 160 def initialize(version: , vector_string: , base_score: , access_vector: nil, access_Complexity: nil, authentication: nil, confidentiality_impact: nil, integrity_impact: nil, availability_impact: nil, exploitability: nil, remediation_level: nil, report_confidence: nil, temporal_score: nil, collateral_damage_potential: nil, target_distribution: nil, confidentiality_requirement: nil, integrity_requirement: nil, availability_requirement: nil, environmental_score: nil) @version = version @vector_string = vector_string @base_score = base_score @access_vector = access_vector @access_Complexity = access_Complexity @authentication = authentication @confidentiality_impact = confidentiality_impact @integrity_impact = integrity_impact @availability_impact = availability_impact @base_score = base_score @exploitability = exploitability @remediation_level = remediation_level @report_confidence = report_confidence @temporal_score = temporal_score @collateral_damage_potential = collateral_damage_potential @target_distribution = target_distribution @confidentiality_requirement = confidentiality_requirement @integrity_requirement = integrity_requirement @availability_requirement = availability_requirement @environmental_score = environmental_score end