File tree Expand file tree Collapse file tree 4 files changed +31212
-1
lines changed
sample_jsons/nessus_mapper Expand file tree Collapse file tree 4 files changed +31212
-1
lines changed Original file line number Diff line number Diff line change 6262 jq 'del(.version, .platform.release)' zap_output.json > zap_output_jq.json
6363 jq 'del(.version, .platform.release)' ./sample_jsons/zap_mapper/zero.webappsecurity.json > zap_sample.json
6464 diff zap_sample.json zap_output_jq.json
65+ - name : Test nessus_mapper
66+ run : |
67+ heimdall_tools nessus_mapper -x ./sample_jsons/nessus_mapper/sample_input_report/nessus_sample.nessus -o nessus.json
68+ jq 'del(.version, .platform.release)' nessus.json-ip-10-10-23-102.json > nessus_jq.json
69+ jq 'del(.version, .platform.release)' ./sample_jsons/nessus_mapper/nessus_sample_hdf.json > nessus_sample_hdf.json
70+ diff nessus_sample_hdf.json nessus_jq.json
Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ def extract_scaninfo
7171 info = { }
7272
7373 info [ 'policyName' ] = policy [ 'policyName' ]
74- info [ 'version' ] = policy [ 'Preferences' ] [ 'ServerPreferences' ] [ 'preference' ] . select { |x | x [ 'name' ] . eql? 'sc_version' } . first [ 'value' ]
74+ 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' ]
7576 info
7677 rescue StandardError => e
7778 raise "Invalid Nessus XML file provided Exception: #{ e } "
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments