We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf97131 commit 9e657baCopy full SHA for 9e657ba
lib/heimdall_tools/nessus_mapper.rb
@@ -71,7 +71,8 @@ def extract_scaninfo
71
info = {}
72
73
info['policyName'] = policy['policyName']
74
- info['version'] = policy['Preferences']['ServerPreferences']['preference'].select { |x| x['name'].eql? 'sc_version' }.first['value']
+ scanner_version = policy['Preferences']['ServerPreferences']['preference'].select { |x| x['name'].eql? 'sc_version' }
75
+ info['version'] = scanner_version.empty? ? NA_STRING : scanner_version.first['value']
76
info
77
rescue StandardError => e
78
raise "Invalid Nessus XML file provided Exception: #{e}"
0 commit comments