Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mapping for publishedDate #340

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading