Skip to content

Commit

Permalink
Update Sample Jsons
Browse files Browse the repository at this point in the history
Signed-off-by: Camden Moors <[email protected]>
  • Loading branch information
camdenmoors committed Aug 9, 2021
1 parent a752498 commit 3f2577f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@ jobs:
- 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
jq 'del(.version, .platform.release)' nessus.json-ip-10-10-23-102.json > nessus-jq.json-ip-10-10-23-102.json
jq 'del(.version, .platform.release)' ./sample_jsons/nessus_mapper/nessus.json-ip-10-10-23-102.json > nessus-sample-jq.json-ip-10-10-23-102.json
diff nessus-sample-jq.json-ip-10-10-23-102.json nessus-jq.json-ip-10-10-23-102.json
jq 'del(.version, .platform.release)' nessus.json-ip-10-10-24-231.json > nessus-jq.json-ip-10-10-24-231.json
jq 'del(.version, .platform.release)' ./sample_jsons/nessus_mapper/nessus.json-ip-10-10-24-231.json > nessus-sample-jq.json-ip-10-10-24-231.json
diff nessus-sample-jq.json-ip-10-10-24-231.json nessus-jq.json-ip-10-10-24-231.json
jq 'del(.version, .platform.release)' nessus.json-ip-10-10-37-43.json > nessus-jq.json-ip-10-10-37-43.json
jq 'del(.version, .platform.release)' ./sample_jsons/nessus_mapper/nessus.json-ip-10-10-37-43.json > nessus-sample-jq.json-ip-10-10-37-43.json
diff nessus-sample-jq.json-ip-10-10-37-43.json nessus-jq.json-ip-10-10-37-43.json
- name: Test scoutsuite mapper
run: |
heimdall_tools scoutsuite_mapper -i ./sample_jsons/scoutsuite_mapper/sample_input_jsons/scoutsuite_sample.js -o scoutsuite_output.json
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ AllCops:
- 'test/**/*'
- 'examples/plugins/train-*/test/**/*'
- 'vendor/**/*'
- 'sample_jsons/**/*'
Style/Documentation:
Enabled: false
Layout/ParameterAlignment:
Expand Down
14 changes: 6 additions & 8 deletions lib/heimdall_tools/nessus_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,16 @@ def format_desc(issue)

def finding(issue, timestamp)
finding = {}
# if compliance-result field, this is a policy compliance result entry
# nessus policy compliance result provides a pass/fail data
# For non policy compliance results are defaulted to failed
if issue['compliance-result']
if issue['compliance-result'].eql?('PASSED')
case issue['compliance-result']
when "PASSED"
finding['status'] = 'passed'
elsif issue['compliance-result'].eql?('FAILED')
when "FAILED"
finding['status'] = 'failed'
elsif issue['compliance-result'].eql?('WARNING')
when "WARNING"
finding['status'] = 'skipped'
elsif issue['compliance-result'].eql?('ERROR')
finding['status'] = 'error'
else
finding['status'] = 'failed'
end
else
finding['status'] = 'failed'
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sample_jsons/nessus_mapper/nessus.json-ip-10-10-37-43.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion sample_jsons/nessus_mapper/nessus_sample_hdf.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 3f2577f

Please sign in to comment.