Module: WpItem::Vulnerable
- Included in:
- WpItem
- Defined in:
- lib/common/models/wp_item/vulnerable.rb
Instance Attribute Summary (collapse)
-
- (Object) vulns_file
Returns the value of attribute vulns_file.
-
- (Object) vulns_xpath
Returns the value of attribute vulns_xpath.
Instance Method Summary (collapse)
-
- (Vulnerabilities) vulnerabilities
Get the vulnerabilities associated to the WpItem.
Instance Attribute Details
- (Object) vulns_file
Returns the value of attribute vulns_file
5 6 7 |
# File 'lib/common/models/wp_item/vulnerable.rb', line 5 def vulns_file @vulns_file end |
- (Object) vulns_xpath
Returns the value of attribute vulns_xpath
5 6 7 |
# File 'lib/common/models/wp_item/vulnerable.rb', line 5 def vulns_xpath @vulns_xpath end |
Instance Method Details
- (Vulnerabilities) vulnerabilities
Get the vulnerabilities associated to the WpItem
10 11 12 13 14 15 16 17 18 |
# File 'lib/common/models/wp_item/vulnerable.rb', line 10 def vulnerabilities xml = xml(vulns_file) vulnerabilities = Vulnerabilities.new xml.xpath(vulns_xpath).each do |node| vulnerabilities << Vulnerability.load_from_xml_node(node) end vulnerabilities end |