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

Added scan name to calls returning CompletedScan #279

Merged
merged 1 commit into from
Aug 23, 2017
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
4 changes: 4 additions & 0 deletions lib/nexpose/scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ class CompletedScan
attr_reader :type
# Name of the engine where the scan was run. Not the unique ID.
attr_reader :engine_name
# Name of the scan that was assigned.
attr_reader :scan_name

# Internal constructor to be called by #parse_json.
def initialize(&block)
Expand All @@ -790,6 +792,7 @@ def self.parse_json(json)
@risk_score = json['riskScore']
@type = json['startedByCD'] == 'S' ? :scheduled : :manual
@engine_name = json['scanEngineName']
@scan_name = json['scanName']
end
end

Expand Down Expand Up @@ -822,6 +825,7 @@ def self.parse_dyntable(json)
@risk_score = json['riskScore']
@type = json['Scan Type'] == 'Manual' ? :manual : :scheduled
@engine_name = json['Scan Engine']
@scan_name = json['Scan Name']
end
end

Expand Down