Skip to content

Commit

Permalink
Merge pull request #94 from mitre/fixes_84
Browse files Browse the repository at this point in the history
  • Loading branch information
rx294 authored May 1, 2021
2 parents bf97131 + ec9ce0e commit 6d50c5d
Show file tree
Hide file tree
Showing 4 changed files with 31,212 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ jobs:
jq 'del(.version, .platform.release)' zap_output.json > zap_output_jq.json
jq 'del(.version, .platform.release)' ./sample_jsons/zap_mapper/zero.webappsecurity.json > zap_sample.json
diff zap_sample.json zap_output_jq.json
- name: Test nessus_mapper
run: |
heimdall_tools nessus_mapper -x ./sample_jsons/nessus_mapper/sample_input_report/nessus_sample.nessus -o nessus.json
jq 'del(.version, .platform.release)' nessus.json-ip-10-10-23-102.json > nessus_jq.json
jq 'del(.version, .platform.release)' ./sample_jsons/nessus_mapper/nessus_sample_hdf.json > nessus_sample_hdf.json
diff nessus_sample_hdf.json nessus_jq.json
3 changes: 2 additions & 1 deletion lib/heimdall_tools/nessus_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def extract_scaninfo
info = {}

info['policyName'] = policy['policyName']
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' }
info['version'] = scanner_version.empty? ? NA_STRING : scanner_version.first['value']
info
rescue StandardError => e
raise "Invalid Nessus XML file provided Exception: #{e}"
Expand Down
1 change: 1 addition & 0 deletions sample_jsons/nessus_mapper/nessus_sample_hdf.json

Large diffs are not rendered by default.

Loading

0 comments on commit 6d50c5d

Please sign in to comment.