Class: Qualys::Vulnerability
- Inherits:
-
Object
- Object
- Qualys::Vulnerability
- Defined in:
- lib/qualys/vulnerability.rb
Overview
Qualys vulnerabilities from a report xml
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#correlation ⇒ Object
Returns the value of attribute correlation.
-
#cve_code_list ⇒ Object
Returns the value of attribute cve_code_list.
-
#details ⇒ Object
Returns the value of attribute details.
-
#first_found ⇒ Object
Returns the value of attribute first_found.
-
#impact ⇒ Object
Returns the value of attribute impact.
-
#last_found ⇒ Object
Returns the value of attribute last_found.
-
#last_update ⇒ Object
Returns the value of attribute last_update.
-
#pci_flag ⇒ Object
Returns the value of attribute pci_flag.
-
#port ⇒ Object
Returns the value of attribute port.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#qid ⇒ Object
Returns the value of attribute qid.
-
#result ⇒ Object
Returns the value of attribute result.
-
#service ⇒ Object
Returns the value of attribute service.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#solution ⇒ Object
Returns the value of attribute solution.
-
#ssl ⇒ Object
Returns the value of attribute ssl.
-
#status ⇒ Object
Returns the value of attribute status.
-
#threat ⇒ Object
Returns the value of attribute threat.
-
#times_found ⇒ Object
Returns the value of attribute times_found.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
-
#vendor_reference_list ⇒ Object
Returns the value of attribute vendor_reference_list.
Instance Method Summary collapse
-
#initialize(vuln, glossary) ⇒ Vulnerability
constructor
A new instance of Vulnerability.
- #to_s ⇒ Object
Constructor Details
#initialize(vuln, glossary) ⇒ Vulnerability
Returns a new instance of Vulnerability.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/qualys/vulnerability.rb', line 12 def initialize(vuln, glossary) parse_vuln vuln match_details glossary parse_cve if @details['CVE_ID_LIST'] parse_details # gives the url to the qualys knowledge base for this vulnerabitlty parse_url end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def category @category end |
#correlation ⇒ Object
Returns the value of attribute correlation.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def correlation @correlation end |
#cve_code_list ⇒ Object
Returns the value of attribute cve_code_list.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def cve_code_list @cve_code_list end |
#details ⇒ Object
Returns the value of attribute details.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def details @details end |
#first_found ⇒ Object
Returns the value of attribute first_found.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def first_found @first_found end |
#impact ⇒ Object
Returns the value of attribute impact.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def impact @impact end |
#last_found ⇒ Object
Returns the value of attribute last_found.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def last_found @last_found end |
#last_update ⇒ Object
Returns the value of attribute last_update.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def last_update @last_update end |
#pci_flag ⇒ Object
Returns the value of attribute pci_flag.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def pci_flag @pci_flag end |
#port ⇒ Object
Returns the value of attribute port.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def port @port end |
#protocol ⇒ Object
Returns the value of attribute protocol.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def protocol @protocol end |
#qid ⇒ Object
Returns the value of attribute qid.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def qid @qid end |
#result ⇒ Object
Returns the value of attribute result.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def result @result end |
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def service @service end |
#severity ⇒ Object
Returns the value of attribute severity.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def severity @severity end |
#solution ⇒ Object
Returns the value of attribute solution.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def solution @solution end |
#ssl ⇒ Object
Returns the value of attribute ssl.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def ssl @ssl end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def status @status end |
#threat ⇒ Object
Returns the value of attribute threat.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def threat @threat end |
#times_found ⇒ Object
Returns the value of attribute times_found.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def times_found @times_found end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def url @url end |
#vendor_reference_list ⇒ Object
Returns the value of attribute vendor_reference_list.
6 7 8 |
# File 'lib/qualys/vulnerability.rb', line 6 def vendor_reference_list @vendor_reference_list end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/qualys/vulnerability.rb', line 23 def to_s "#{qid}, #{title}, severity : #{severity}, cves: #{cve_code_list&.join(', ') || 'no cve'}" end |