Class: Tenable::Models::Finding

Inherits:
Data
  • Object
show all
Defined in:
lib/tenable/models/finding.rb

Overview

Represents a web application scan finding.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def description
  @description
end

#finding_idObject (readonly)

Returns the value of attribute finding_id

Returns:

  • (Object)

    the current value of finding_id



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def finding_id
  @finding_id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def name
  @name
end

#plugin_idObject (readonly)

Returns the value of attribute plugin_id

Returns:

  • (Object)

    the current value of plugin_id



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def plugin_id
  @plugin_id
end

#remediationObject (readonly)

Returns the value of attribute remediation

Returns:

  • (Object)

    the current value of remediation



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def remediation
  @remediation
end

#severityObject (readonly)

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def severity
  @severity
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



6
7
8
# File 'lib/tenable/models/finding.rb', line 6

def url
  @url
end

Class Method Details

.from_api(data) ⇒ Finding

Builds a Finding from a raw API response hash.

Parameters:

  • data (Hash)

    raw API response hash with string keys

Returns:



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/tenable/models/finding.rb', line 11

def self.from_api(data)
  data = data.transform_keys(&:to_sym)
  new(
    finding_id: data[:finding_id],
    severity: data[:severity],
    url: data[:url],
    name: data[:name],
    description: data[:description],
    remediation: data[:remediation],
    plugin_id: data[:plugin_id]
  )
end