risu 1.7.9 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/LICENSE +1 -1
  5. data/README.markdown +16 -8
  6. data/Rakefile +12 -3
  7. data/bin/risu +2 -2
  8. data/docs/NEWS.markdown +32 -9
  9. data/lib/risu.rb +2 -2
  10. data/lib/risu/base.rb +1 -1
  11. data/lib/risu/base/graph_template_helper.rb +20 -26
  12. data/lib/risu/base/host_template_helper.rb +17 -23
  13. data/lib/risu/base/malware_template_helper.rb +18 -24
  14. data/lib/risu/base/post_process_base.rb +97 -71
  15. data/lib/risu/base/post_process_manager.rb +3 -3
  16. data/lib/risu/base/scan_helper.rb +17 -23
  17. data/lib/risu/base/schema.rb +2 -2
  18. data/lib/risu/base/shares_template_helper.rb +18 -24
  19. data/lib/risu/base/template_base.rb +1 -1
  20. data/lib/risu/base/template_helper.rb +20 -26
  21. data/lib/risu/base/template_manager.rb +5 -5
  22. data/lib/risu/base/templater.rb +3 -5
  23. data/lib/risu/cli.rb +1 -1
  24. data/lib/risu/cli/application.rb +26 -5
  25. data/lib/risu/cli/banner.rb +1 -1
  26. data/lib/risu/exceptions.rb +1 -1
  27. data/lib/risu/exceptions/invaliddocument.rb +1 -1
  28. data/lib/risu/graphs.rb +1 -1
  29. data/lib/risu/graphs/top_vuln_graph.rb +1 -1
  30. data/lib/risu/graphs/windows_os_graph.rb +1 -1
  31. data/lib/risu/models.rb +1 -1
  32. data/lib/risu/models/attachment.rb +1 -1
  33. data/lib/risu/models/familyselection.rb +1 -1
  34. data/lib/risu/models/host.rb +13 -13
  35. data/lib/risu/models/hostproperty.rb +1 -1
  36. data/lib/risu/models/individualpluginselection.rb +1 -1
  37. data/lib/risu/models/item.rb +7 -7
  38. data/lib/risu/models/patch.rb +1 -1
  39. data/lib/risu/models/plugin.rb +1 -1
  40. data/lib/risu/models/pluginspreference.rb +1 -1
  41. data/lib/risu/models/policy.rb +1 -1
  42. data/lib/risu/models/reference.rb +1 -1
  43. data/lib/risu/models/report.rb +2 -2
  44. data/lib/risu/models/serverpreference.rb +1 -1
  45. data/lib/risu/models/servicedescription.rb +1 -1
  46. data/lib/risu/models/version.rb +1 -1
  47. data/lib/risu/parsers.rb +1 -1
  48. data/lib/risu/parsers/nessus/nessus_document.rb +1 -1
  49. data/lib/risu/parsers/nessus/nessus_sax_listener.rb +1 -1
  50. data/lib/risu/parsers/nessus/postprocess.rb +1 -1
  51. data/lib/risu/parsers/nessus/postprocess/7zip.rb +46 -0
  52. data/lib/risu/parsers/nessus/postprocess/adobe_acrobat.rb +8 -1
  53. data/lib/risu/parsers/nessus/postprocess/adobe_air.rb +1 -1
  54. data/lib/risu/parsers/nessus/postprocess/adobe_reader.rb +5 -3
  55. data/lib/risu/parsers/nessus/postprocess/apache.rb +1 -1
  56. data/lib/risu/parsers/nessus/postprocess/apache_tomcat.rb +1 -1
  57. data/lib/risu/parsers/nessus/postprocess/apple_itunes.rb +2 -1
  58. data/lib/risu/parsers/nessus/postprocess/apple_quicktime.rb +26 -3
  59. data/lib/risu/parsers/nessus/postprocess/blackberry_enterprise_server.rb +1 -1
  60. data/lib/risu/parsers/nessus/postprocess/ca_brightstor_arcserve.rb +1 -1
  61. data/lib/risu/parsers/nessus/postprocess/cisco_anyconnect.rb +5 -1
  62. data/lib/risu/parsers/nessus/postprocess/cisco_ios.rb +1 -1
  63. data/lib/risu/parsers/nessus/postprocess/core_ftp.rb +1 -1
  64. data/lib/risu/parsers/nessus/postprocess/db2.rb +1 -1
  65. data/lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb +3 -2
  66. data/lib/risu/parsers/nessus/postprocess/filezilla.rb +1 -1
  67. data/lib/risu/parsers/nessus/postprocess/firefox.rb +3 -1
  68. data/lib/risu/parsers/nessus/postprocess/flash_player.rb +29 -26
  69. data/lib/risu/parsers/nessus/postprocess/flexnet.rb +1 -1
  70. data/lib/risu/parsers/nessus/postprocess/foxit_phantom_pdf.rb +46 -0
  71. data/lib/risu/parsers/nessus/postprocess/foxit_reader.rb +11 -8
  72. data/lib/risu/parsers/nessus/postprocess/google_chrome.rb +11 -1
  73. data/lib/risu/parsers/nessus/postprocess/hp_system_mgt_homepage.rb +2 -1
  74. data/lib/risu/parsers/nessus/postprocess/irfanview.rb +1 -1
  75. data/lib/risu/parsers/nessus/postprocess/java.rb +3 -1
  76. data/lib/risu/parsers/nessus/postprocess/libreoffice.rb +3 -2
  77. data/lib/risu/parsers/nessus/postprocess/openoffice.rb +3 -1
  78. data/lib/risu/parsers/nessus/postprocess/openssh.rb +1 -1
  79. data/lib/risu/parsers/nessus/postprocess/openssl.rb +1 -1
  80. data/lib/risu/parsers/nessus/postprocess/oracle_database.rb +1 -1
  81. data/lib/risu/parsers/nessus/postprocess/php.rb +1 -1
  82. data/lib/risu/parsers/nessus/postprocess/post_process.rb +2 -2
  83. data/lib/risu/parsers/nessus/postprocess/real_player.rb +53 -0
  84. data/lib/risu/parsers/nessus/postprocess/risk_score.rb +1 -1
  85. data/lib/risu/parsers/nessus/postprocess/root_cause.rb +2 -3
  86. data/lib/risu/parsers/nessus/postprocess/servu.rb +1 -1
  87. data/lib/risu/parsers/nessus/postprocess/shockwave.rb +1 -1
  88. data/lib/risu/parsers/nessus/postprocess/sigplus_pro.rb +1 -1
  89. data/lib/risu/parsers/nessus/postprocess/skype.rb +46 -0
  90. data/lib/risu/parsers/nessus/postprocess/symantec_endpoint.rb +52 -0
  91. data/lib/risu/parsers/nessus/postprocess/symantec_pcanywhere.rb +1 -1
  92. data/lib/risu/parsers/nessus/postprocess/timbuktu.rb +1 -1
  93. data/lib/risu/parsers/nessus/postprocess/vlc.rb +12 -9
  94. data/lib/risu/parsers/nessus/postprocess/vmware_esxi.rb +9 -2
  95. data/lib/risu/parsers/nessus/postprocess/vmware_player.rb +1 -1
  96. data/lib/risu/parsers/nessus/postprocess/vmware_vcenter.rb +2 -2
  97. data/lib/risu/parsers/nessus/postprocess/vmware_vsphere_client.rb +1 -1
  98. data/lib/risu/parsers/nessus/postprocess/windows.rb +751 -705
  99. data/lib/risu/parsers/nessus/postprocess/winscp.rb +1 -1
  100. data/lib/risu/parsers/nessus/postprocess/wireshark.rb +2 -1
  101. data/lib/risu/parsers/nexpose/nexpose_document.rb +1 -1
  102. data/lib/risu/parsers/nexpose/simple_nexpose.rb +1 -1
  103. data/lib/risu/renderers.rb +1 -1
  104. data/lib/risu/renderers/csvrenderer.rb +3 -3
  105. data/lib/risu/renderers/nilrenderer.rb +1 -1
  106. data/lib/risu/renderers/pdfrenderer.rb +4 -5
  107. data/lib/risu/template_helpers.rb +1 -1
  108. data/lib/risu/templates/assets.rb +3 -3
  109. data/lib/risu/templates/authentication_summary.rb +34 -5
  110. data/lib/risu/templates/cover_sheet.rb +3 -6
  111. data/lib/risu/templates/exec_summary.rb +12 -4
  112. data/lib/risu/templates/executive_summary_detailed.rb +3 -3
  113. data/lib/risu/templates/exploitablity_summary.rb +3 -3
  114. data/lib/risu/templates/failed_audits.rb +20 -26
  115. data/lib/risu/templates/finding_statistics.rb +3 -3
  116. data/lib/risu/templates/findings_host.rb +3 -3
  117. data/lib/risu/templates/findings_summary.rb +5 -5
  118. data/lib/risu/templates/findings_summary_with_pluginid.rb +5 -5
  119. data/lib/risu/templates/graphs.rb +3 -3
  120. data/lib/risu/templates/host_findings_csv.rb +3 -3
  121. data/lib/risu/templates/host_summary.rb +3 -3
  122. data/lib/risu/templates/malicious_process_detection.rb +3 -3
  123. data/lib/risu/templates/missing_root_causes.rb +3 -3
  124. data/lib/risu/templates/ms_patch_summary.rb +3 -3
  125. data/lib/risu/templates/ms_update_summary.rb +3 -3
  126. data/lib/risu/templates/ms_wsus_findings.rb +19 -26
  127. data/lib/risu/templates/notable.rb +3 -3
  128. data/lib/risu/templates/notable_detailed.rb +3 -3
  129. data/lib/risu/templates/pci_compliance.rb +3 -3
  130. data/lib/risu/templates/stig_findings_summary.rb +3 -3
  131. data/lib/risu/templates/talking_points.rb +5 -31
  132. data/lib/risu/templates/technical_findings.rb +3 -3
  133. data/lib/risu/templates/template.rb +3 -3
  134. data/lib/risu/templates/top_25.rb +3 -3
  135. data/lib/risu/version.rb +6 -5
  136. data/risu.gemspec +9 -7
  137. metadata +49 -20
  138. metadata.gz.sig +2 -0
  139. data/Gemfile.lock +0 -148
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -78,6 +78,7 @@ module Risu
78
78
  89103,
79
79
  90786,
80
80
  90787,
81
+ 92817,
81
82
 
82
83
 
83
84
  ]
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,14 +25,14 @@ module Risu
25
25
 
26
26
  # @TODO comment
27
27
  #
28
- def self.generate(output_file, &block)
28
+ def self.generate output_file, &block
29
29
  #csv = new(output_file, &block)
30
30
  return new(output_file, &block)
31
31
  end
32
32
 
33
33
  # @TODO comment
34
34
  #
35
- def initialize(output_file, &block)
35
+ def initialize output_file, &block
36
36
  @output_file = output_file
37
37
  instance_eval(&block)
38
38
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -23,10 +23,9 @@ module Risu
23
23
  module Renderers
24
24
  class PDFRenderer
25
25
 
26
- #@TODO
27
- def initialize ()
28
-
29
-
26
+ #@TODO
27
+ def initialize
28
+
30
29
  end
31
30
 
32
31
  # @TODO comment
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,7 @@ module Risu
24
24
  class AssetsTemplate < Risu::Base::TemplateBase
25
25
  include TemplateHelper
26
26
 
27
- def initialize ()
27
+ def initialize
28
28
  @template_info =
29
29
  {
30
30
  :name => "assets",
@@ -35,7 +35,7 @@ module Risu
35
35
  }
36
36
  end
37
37
 
38
- def render(output)
38
+ def render output
39
39
  text Report.classification.upcase, :align => :center
40
40
  text "\n"
41
41
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,12 +25,12 @@ module Risu
25
25
  include TemplateHelper
26
26
 
27
27
  #
28
- def initialize ()
28
+ def initialize
29
29
  @template_info =
30
30
  {
31
31
  :name => "authentication_summary",
32
32
  :author => "hammackj",
33
- :version => "0.0.1",
33
+ :version => "0.0.2",
34
34
  :renderer => "PDF",
35
35
  :description => "Generates a Authentication Summary Report"
36
36
  }
@@ -38,7 +38,7 @@ module Risu
38
38
 
39
39
  #
40
40
  #
41
- def render(output)
41
+ def render output
42
42
  @output.text Report.classification.upcase, :align => :center
43
43
  @output.text "\n"
44
44
 
@@ -52,6 +52,35 @@ module Risu
52
52
  @output.text "#{Report.scan_date}"
53
53
  @output.text "\n"
54
54
 
55
+
56
+ credentialied_scans = HostProperty.where(:name => "Credentialed_Scan")
57
+ auth = []
58
+ unauth = []
59
+
60
+ credentialied_scans.each do |s|
61
+ if s.value == "true"
62
+ auth.push(s.host_id)
63
+ else
64
+ unauth.push(s.host_id)
65
+ end
66
+ end
67
+
68
+ auth_hosts = []
69
+
70
+ auth.each do |h|
71
+ auth_hosts.push Host.find(h).ip
72
+ end
73
+
74
+ @output.text "Authenticated Count:", :style => :bold
75
+ @output.text "#{auth.size}"
76
+ @output.text "\n"
77
+ @output.text "#{auth_hosts.join(", ")}"
78
+ @output.text "\n"
79
+
80
+ @output.text "UnAuthenticated Count:", :style => :bold
81
+ @output.text "#{unauth.size}"
82
+ @output.text "\n"
83
+
55
84
  results = Array.new
56
85
 
57
86
  headers = ["Hostname", "OS", "Authenticated"]
@@ -65,7 +94,7 @@ module Risu
65
94
  if host.host_properties.where(:name => "Credentialed_Scan").first != nil
66
95
  authenticated = host.host_properties.where(:name => "Credentialed_Scan").first.value
67
96
  end
68
-
97
+
69
98
  os = host.os
70
99
 
71
100
  host_name = host.name
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,7 @@ module Risu
24
24
  class CoverSheet < Risu::Base::TemplateBase
25
25
  include TemplateHelper
26
26
 
27
- def initialize ()
27
+ def initialize
28
28
  @template_info =
29
29
  {
30
30
  :name => "cover_sheet",
@@ -35,7 +35,7 @@ module Risu
35
35
  }
36
36
  end
37
37
 
38
- def render(output)
38
+ def render output
39
39
  output.image "#{File.expand_path(File.dirname(__FILE__))}/data/nessuslogo.jpg", :scale => 0.2, :position => :left, :vposition => :top
40
40
 
41
41
  text "\n"
@@ -83,6 +83,3 @@ module Risu
83
83
  end
84
84
  end
85
85
  end
86
-
87
-
88
-
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -26,7 +26,7 @@ module Risu
26
26
 
27
27
  #
28
28
  #
29
- def initialize ()
29
+ def initialize
30
30
  @template_info =
31
31
  {
32
32
  :name => "exec_summary",
@@ -39,7 +39,7 @@ module Risu
39
39
 
40
40
  #
41
41
  #
42
- def render(output)
42
+ def render output
43
43
  output.text Report.classification.upcase, :align => :center
44
44
  output.text "\n"
45
45
 
@@ -53,8 +53,16 @@ module Risu
53
53
  output.text "#{Report.scan_date}"
54
54
  output.text "\n"
55
55
 
56
- output.text "This report contains the results of a security audit performed on #{Report.scan_date}. It contains confidential information about the state of your network. Access to this information by unauthorized personnel may allow them to compromise your network.\n\n"
56
+ output.text "This report contains the results of a security audit performed on #{Report.scan_date}."
57
57
 
58
+ if Report.owner.nil? or Report.network.nil? or Report.location.nil?
59
+ output.text "It contains confidential information about the state of your network."
60
+ else
61
+ output.text "It contains confidential information about the state of #{Report.owner}'s #{Report.network} network at #{Report.location}."
62
+ end
63
+
64
+ output.text "Access to this information by unauthorized personnel may allow them to compromise said network.\n\n"
65
+
58
66
  output.text "A total of #{Host.count} hosts were found and scanned for vulnerabilities.\n\n"
59
67
 
60
68
  output.text "There were #{Item.risks.count} vulnerabilities found during this scan. Of these, #{Item.critical_risks.count} were critical vulnerabilities,#{Item.high_risks.count} were high vulnerabilities, #{Item.medium_risks.count} were medium vulnerabilities, #{Item.low_risks.count} were low vulnerabilities and #{Item.info_risks.count} were information findings.\n\n"
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ module Risu
25
25
 
26
26
  #
27
27
  #
28
- def initialize ()
28
+ def initialize
29
29
  @template_info =
30
30
  {
31
31
  :name => "exec_summary_detailed",
@@ -38,7 +38,7 @@ module Risu
38
38
 
39
39
  #
40
40
  #
41
- def render(output)
41
+ def render output
42
42
  output.font_size 10
43
43
  output.font "Times-Roman"
44
44
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ module Risu
25
25
  include TemplateHelper
26
26
 
27
27
  #
28
- def initialize ()
28
+ def initialize
29
29
  @template_info =
30
30
  {
31
31
  :name => "exploitablity_summary",
@@ -38,7 +38,7 @@ module Risu
38
38
 
39
39
  # Generates a report with 4 Tables of findings showing which exploit
40
40
  # framework has a exploit for the vulnerable finding.
41
- def render(output)
41
+ def render output
42
42
  report_classification
43
43
 
44
44
  report_title Report.title
@@ -1,28 +1,22 @@
1
- # Copyright (c) 2010-2013 Arxopia LLC.
2
- # All rights reserved.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
3
2
  #
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
6
9
  #
7
- # * Redistributions of source code must retain the above copyright
8
- # notice, this list of conditions and the following disclaimer.
9
- # * Redistributions in binary form must reproduce the above copyright
10
- # notice, this list of conditions and the following disclaimer in the
11
- # documentation and/or other materials provided with the distribution.
12
- # * Neither the name of the Arxopia LLC nor the names of its contributors
13
- # may be used to endorse or promote products derived from this software
14
- # without specific prior written permission.
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
15
12
  #
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- # DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
20
- # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
- # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22
- # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
- # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24
- # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25
- # OF THE POSSIBILITY OF SUCH DAMAGE.
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
26
20
 
27
21
  module Risu
28
22
  module Templates
@@ -31,7 +25,7 @@ module Risu
31
25
 
32
26
  # Initializes the template loading meta data
33
27
  #
34
- def initialize ()
28
+ def initialize
35
29
  @template_info =
36
30
  {
37
31
  :name => "failed_audits",
@@ -53,7 +47,7 @@ module Risu
53
47
 
54
48
  # Called during the rendering process
55
49
  #
56
- def render(output)
50
+ def render output
57
51
  text Report.classification.upcase, :align => :center
58
52
  text "\n"
59
53
 
@@ -69,7 +63,7 @@ module Risu
69
63
 
70
64
  Host.all.each do |h|
71
65
  print_header(20, "#{h.name} (#{h.ip})", "000000")
72
-
66
+
73
67
  if h.items.where(:cm_compliance_result => "FAILED").count > 0
74
68
  data = [["Name", "Policy", "Value"]]
75
69
  h.items.where(:cm_compliance_result => "FAILED").each do |cm|
@@ -82,7 +76,7 @@ module Risu
82
76
  end
83
77
  text "\n"
84
78
 
85
- elsif h.items.where(:cm_compliance_result => "PASSED").count > 0
79
+ elsif h.items.where(:cm_compliance_result => "PASSED").count > 0
86
80
  text "Host passed all audits."
87
81
  else
88
82
  text "Audits were not conducted on host."
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ module Risu
25
25
 
26
26
  #
27
27
  #
28
- def initialize ()
28
+ def initialize
29
29
  @template_info =
30
30
  {
31
31
  :name => "finding_statistics",
@@ -38,7 +38,7 @@ module Risu
38
38
 
39
39
  #
40
40
  #
41
- def render(output)
41
+ def render output
42
42
  output.text Report.classification.upcase, :align => :center
43
43
  output.text "\n"
44
44
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@ module Risu
25
25
 
26
26
  #
27
27
  #
28
- def initialize ()
28
+ def initialize
29
29
  @template_info =
30
30
  {
31
31
  :name => "findings_host",
@@ -38,7 +38,7 @@ module Risu
38
38
 
39
39
  #
40
40
  #
41
- def render(output)
41
+ def render output
42
42
  @output.font_size 10
43
43
 
44
44
  report_classification
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,7 @@ module Risu
24
24
  class FindingsSummary < Risu::Base::TemplateBase
25
25
  include TemplateHelper
26
26
 
27
- def initialize ()
27
+ def initialize
28
28
  @template_info =
29
29
  {
30
30
  :name => "findings_summary",
@@ -35,7 +35,7 @@ module Risu
35
35
  }
36
36
  end
37
37
 
38
- def print_risk_title (text, color)
38
+ def print_risk_title text, color
39
39
  @output.font_size(20) do
40
40
  @output.fill_color color.gsub('#', '')
41
41
  @output.text text, :style => :bold
@@ -43,7 +43,7 @@ module Risu
43
43
  end
44
44
  end
45
45
 
46
- def print_risk_summary(risks, text, color)
46
+ def print_risk_summary risks, text, color
47
47
  print_risk_title(text, color) if risks.length != 0
48
48
 
49
49
  risks.each do |item|
@@ -54,7 +54,7 @@ module Risu
54
54
  end
55
55
  end
56
56
 
57
- def render(output)
57
+ def render output
58
58
  text Report.classification.upcase, :align => :center
59
59
  text "\n"
60
60