Sha256: c9cfd0b974a9bf86fdfe9b7e249735c8561ecf6288577a95c15b410d08f40730
Contents?: true
Size: 778 Bytes
Versions: 11
Compression:
Stored size: 778 Bytes
Contents
# frozen_string_literal: true module WPScan # Specific implementation class Vulnerability < CMSScanner::Vulnerability include References # @param [ Hash ] json_data # @return [ Vulnerability ] def self.load_from_json(json_data) references = { wpvulndb: json_data['id'].to_s } if json_data['references'] references_keys.each do |key| references[key] = json_data['references'][key.to_s] if json_data['references'].key?(key.to_s) end end new( json_data['title'], references: references, type: json_data['vuln_type'], fixed_in: json_data['fixed_in'], introduced_in: json_data['introduced_in'], cvss: json_data['cvss']&.symbolize_keys ) end end end
Version data entries
11 entries across 11 versions & 1 rubygems