diff --git a/bin/ssh_scan b/bin/ssh_scan index 5982a372..ffca12a1 100755 --- a/bin/ssh_scan +++ b/bin/ssh_scan @@ -261,7 +261,7 @@ puts JSON.pretty_generate(results) if options["unit_test"] == true results.each do |result| - if result.compliant == false + if result["compliance"] && result["compliance"]["compliant"] == false exit 1 #non-zero means a false else exit 0 #non-zero means pass diff --git a/lib/ssh_scan/policy_manager.rb b/lib/ssh_scan/policy_manager.rb index 5fe1e770..9f390101 100644 --- a/lib/ssh_scan/policy_manager.rb +++ b/lib/ssh_scan/policy_manager.rb @@ -212,10 +212,10 @@ def recommendations def compliance_results { - :policy => @policy.name, - :compliant => compliant?, - :recommendations => recommendations, - :references => @policy.references, + "policy" => @policy.name, + "compliant" => compliant?, + "recommendations" => recommendations, + "references" => @policy.references, } end end diff --git a/lib/ssh_scan/version.rb b/lib/ssh_scan/version.rb index a36e0317..2c0c1ce5 100644 --- a/lib/ssh_scan/version.rb +++ b/lib/ssh_scan/version.rb @@ -1,3 +1,3 @@ module SSHScan - VERSION = '0.0.28' + VERSION = '0.0.29' end