Skip to content

Commit

Permalink
Remove mapping for publishedDate
Browse files Browse the repository at this point in the history
  • Loading branch information
phunter-r7 committed Aug 7, 2024
1 parent 40bd037 commit 4d5007a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/nexpose/vuln.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ class VulnerabilitySummary < Vulnerability
attr_accessor :added
# The last date the vulnerability was modified.
attr_accessor :modified
# The date when the information about the vulnerability was first released.
attr_accessor :published
# How the vulnerability is exploited according to PCI standards.
attr_accessor :cvss_vector
# The computation of the Common Vulnerability Scoring System indicating
Expand All @@ -173,7 +171,6 @@ def self.parse_attributes(xml)
vuln.credentials = xml.attributes['requiresCredentials'] == 'true'

# These three fields are optional in the XSD.
vuln.published = Date.parse(xml.attributes['published']) if xml.attributes['published']
vuln.cvss_vector = xml.attributes['cvssVector'] if xml.attributes['cvssVector']
vuln.cvss_score = xml.attributes['cvssScore'].to_f if xml.attributes['cvssScore']
vuln
Expand Down Expand Up @@ -240,8 +237,6 @@ class VulnFinding
attr_reader :cvss_score
attr_reader :cvss_vector
attr_reader :risk
# Date this vulnerability was published.
attr_reader :published
attr_reader :severity
# Number of instances of this vulnerabilty finding on an asset.
attr_reader :instances
Expand All @@ -259,7 +254,6 @@ def initialize(json)
@cvss_vector = json['cvssBase']
@cvss_score = json['cvssScore']
@risk = json['riskScore']
@published = Time.at(json['publishedDate'] / 1000)
@severity = json['severity']
@instances = json['vulnInstanceCount']
@exploit = json['mainExploit']
Expand All @@ -279,7 +273,6 @@ def initialize(hash)
@cvss_vector = hash['CVSS Base Vector']
@cvss_score = hash['CVSS Score'].to_f
@risk = hash['Risk'].to_f
@published = Time.at(hash['Published On'].to_i / 1000)
@severity = hash['Severity'].to_i
@instances = hash['Instances'].to_i
@exploit = hash['ExploitSource']
Expand Down

0 comments on commit 4d5007a

Please sign in to comment.