risu 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.ci +2 -5
- data/KNOWNISSUES.markdown +12 -11
- data/LICENSE +11 -11
- data/NEWS.markdown +43 -8
- data/README.markdown +36 -32
- data/Rakefile +29 -9
- data/TODO.markdown +150 -77
- data/bin/risu +26 -0
- data/lib/risu.rb +27 -1
- data/lib/risu/base.rb +26 -0
- data/lib/risu/base/prawn_templater.rb +36 -8
- data/lib/risu/base/schema.rb +199 -163
- data/lib/risu/base/template_base.rb +34 -7
- data/lib/risu/base/template_manager.rb +37 -37
- data/lib/risu/base/templater.rb +36 -9
- data/lib/risu/cli.rb +26 -0
- data/lib/risu/cli/application.rb +72 -39
- data/lib/risu/cli/banner.rb +47 -21
- data/lib/risu/exceptions.rb +26 -0
- data/lib/risu/exceptions/invaliddocument.rb +30 -1
- data/lib/risu/models.rb +26 -0
- data/lib/risu/models/familyselection.rb +28 -2
- data/lib/risu/models/host.rb +59 -2
- data/lib/risu/models/individualpluginselection.rb +26 -1
- data/lib/risu/models/item.rb +132 -79
- data/lib/risu/models/patch.rb +26 -1
- data/lib/risu/models/plugin.rb +28 -2
- data/lib/risu/models/pluginspreference.rb +26 -2
- data/lib/risu/models/policy.rb +27 -2
- data/lib/risu/models/reference.rb +81 -20
- data/lib/risu/models/report.rb +33 -8
- data/lib/risu/models/serverpreference.rb +26 -1
- data/lib/risu/models/servicedescription.rb +26 -1
- data/lib/risu/models/version.rb +26 -1
- data/lib/risu/parsers.rb +29 -0
- data/lib/risu/parsers/nessus/nessus_document.rb +47 -14
- data/lib/risu/parsers/nessus/nessus_sax_listener.rb +45 -16
- data/lib/risu/parsers/nexpose/nexpose_document.rb +91 -0
- data/lib/risu/parsers/nexpose/simple_nexpose.rb +108 -0
- data/lib/risu/renderers.rb +26 -0
- data/lib/risu/renderers/nilrenderer.rb +30 -4
- data/lib/risu/templates/assets.rb +36 -10
- data/lib/risu/templates/cover_sheet.rb +34 -8
- data/lib/risu/templates/exec_summary.rb +45 -19
- data/lib/risu/templates/executive_summary.rb +37 -11
- data/lib/risu/templates/finding_statistics.rb +33 -7
- data/lib/risu/templates/findings_host.rb +44 -18
- data/lib/risu/templates/findings_summary.rb +43 -17
- data/lib/risu/templates/findings_summary_with_pluginid.rb +60 -18
- data/lib/risu/templates/graphs.rb +30 -0
- data/lib/risu/templates/host_summary.rb +34 -8
- data/lib/risu/templates/ms_patch_summary.rb +35 -9
- data/lib/risu/templates/ms_update_summary.rb +34 -8
- data/lib/risu/templates/ms_wsus_findings.rb +99 -0
- data/lib/risu/templates/notable.rb +39 -13
- data/lib/risu/templates/notable_detailed.rb +42 -16
- data/lib/risu/templates/pci_compliance.rb +40 -14
- data/lib/risu/templates/stig_findings_summary.rb +62 -36
- data/lib/risu/templates/technical_findings.rb +29 -3
- data/lib/risu/templates/template.rb +35 -9
- data/risu.gemspec +28 -7
- metadata +94 -101
@@ -1,29 +1,55 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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.
|
15
|
+
|
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.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Templates
|
3
29
|
class FindingsHost < Risu::Base::TemplateBase
|
4
|
-
|
30
|
+
|
5
31
|
#
|
6
32
|
#
|
7
33
|
def initialize ()
|
8
|
-
@template_info =
|
9
|
-
{
|
10
|
-
:name => "findings_host",
|
11
|
-
:author => "hammackj",
|
12
|
-
:version => "0.0.2",
|
34
|
+
@template_info =
|
35
|
+
{
|
36
|
+
:name => "findings_host",
|
37
|
+
:author => "hammackj",
|
38
|
+
:version => "0.0.2",
|
13
39
|
:description => "Generates a findings report by host"
|
14
40
|
}
|
15
41
|
end
|
16
|
-
|
42
|
+
|
17
43
|
#
|
18
44
|
#
|
19
45
|
def render(output)
|
20
46
|
output.font_size 10
|
21
|
-
|
47
|
+
|
22
48
|
output.text Report.classification.upcase, :align => :center
|
23
49
|
output.text "\n"
|
24
50
|
|
25
51
|
output.font_size(22) { output.text Report.title, :align => :center }
|
26
|
-
output.font_size(18) {
|
52
|
+
output.font_size(18) {
|
27
53
|
output.text "Findings Summary by Host Report", :align => :center
|
28
54
|
output.text "\n"
|
29
55
|
output.text "This report was prepared by\n#{Report.author}", :align => :center
|
@@ -34,18 +60,18 @@ module Risu
|
|
34
60
|
Host.sorted.each do |host|
|
35
61
|
if host.items.high_risks_unique_sorted.all.size > 0 or host.items.medium_risks_unique_sorted.all.size > 0
|
36
62
|
output.font_size(16) do
|
37
|
-
|
63
|
+
|
38
64
|
host_string = "#{host.ip}"
|
39
65
|
host_string << " (#{host.fqdn})" if host.fqdn != nil
|
40
|
-
|
41
|
-
output.text "#{host_string}", :style => :bold
|
66
|
+
|
67
|
+
output.text "#{host_string}", :style => :bold
|
42
68
|
end
|
43
69
|
end
|
44
70
|
|
45
71
|
if host.items.critical_risks_unique_sorted.all.size > 0
|
46
|
-
output.font_size(12) do
|
72
|
+
output.font_size(12) do
|
47
73
|
output.fill_color "551A8B"
|
48
|
-
output.text "Critical Findings", :style => :bold
|
74
|
+
output.text "Critical Findings", :style => :bold
|
49
75
|
output.fill_color "000000"
|
50
76
|
end
|
51
77
|
|
@@ -56,9 +82,9 @@ module Risu
|
|
56
82
|
end
|
57
83
|
|
58
84
|
if host.items.high_risks_unique_sorted.all.size > 0
|
59
|
-
output.font_size(12) {
|
85
|
+
output.font_size(12) {
|
60
86
|
output.fill_color "FF0000"
|
61
|
-
output.text "High Findings", :style => :bold
|
87
|
+
output.text "High Findings", :style => :bold
|
62
88
|
output.fill_color "000000"
|
63
89
|
}
|
64
90
|
|
@@ -69,9 +95,9 @@ module Risu
|
|
69
95
|
end
|
70
96
|
|
71
97
|
if host.items.medium_risks_unique_sorted.all.size > 0
|
72
|
-
output.font_size(12) {
|
98
|
+
output.font_size(12) {
|
73
99
|
output.fill_color "FF8040"
|
74
|
-
output.text "Medium Findings", :style => :bold
|
100
|
+
output.text "Medium Findings", :style => :bold
|
75
101
|
output.fill_color "000000"
|
76
102
|
}
|
77
103
|
|
@@ -1,29 +1,55 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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.
|
15
|
+
|
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.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Templates
|
3
29
|
class FindingsSummary < Risu::Base::TemplateBase
|
4
|
-
|
30
|
+
|
5
31
|
#
|
6
32
|
#
|
7
33
|
def initialize ()
|
8
|
-
@template_info =
|
9
|
-
{
|
10
|
-
:name => "findings_summary",
|
11
|
-
:author => "hammackj",
|
12
|
-
:version => "0.0.1",
|
34
|
+
@template_info =
|
35
|
+
{
|
36
|
+
:name => "findings_summary",
|
37
|
+
:author => "hammackj",
|
38
|
+
:version => "0.0.1",
|
13
39
|
:description => "Generates a findings summary report"
|
14
40
|
}
|
15
41
|
end
|
16
|
-
|
42
|
+
|
17
43
|
#
|
18
44
|
#
|
19
45
|
def render(output)
|
20
46
|
output.text Report.classification.upcase, :align => :center
|
21
47
|
output.text "\n"
|
22
48
|
|
23
|
-
output.font_size(22) do
|
24
|
-
output.text Report.title, :align => :center
|
49
|
+
output.font_size(22) do
|
50
|
+
output.text Report.title, :align => :center
|
25
51
|
end
|
26
|
-
|
52
|
+
|
27
53
|
output.font_size(18) do
|
28
54
|
output.text "Findings Summary Report", :align => :center
|
29
55
|
output.text "\n"
|
@@ -34,7 +60,7 @@ module Risu
|
|
34
60
|
|
35
61
|
output.font_size(20) do
|
36
62
|
output.fill_color "551A8B"
|
37
|
-
output.text "Critical Findings", :style => :bold
|
63
|
+
output.text "Critical Findings", :style => :bold
|
38
64
|
output.fill_color "000000"
|
39
65
|
end
|
40
66
|
|
@@ -47,7 +73,7 @@ module Risu
|
|
47
73
|
|
48
74
|
output.font_size(20) do
|
49
75
|
output.fill_color "FF0000"
|
50
|
-
output.text "High Findings", :style => :bold
|
76
|
+
output.text "High Findings", :style => :bold
|
51
77
|
output.fill_color "000000"
|
52
78
|
end
|
53
79
|
|
@@ -62,7 +88,7 @@ module Risu
|
|
62
88
|
|
63
89
|
output.font_size(20) do
|
64
90
|
output.fill_color "FF8040"
|
65
|
-
output.text "Medium Findings", :style => :bold
|
91
|
+
output.text "Medium Findings", :style => :bold
|
66
92
|
output.fill_color "000000"
|
67
93
|
end
|
68
94
|
|
@@ -75,9 +101,9 @@ module Risu
|
|
75
101
|
|
76
102
|
output.start_new_page
|
77
103
|
|
78
|
-
output.font_size(20) {
|
104
|
+
output.font_size(20) {
|
79
105
|
output.fill_color "0000FF"
|
80
|
-
output.text "Low Findings", :style => :bold
|
106
|
+
output.text "Low Findings", :style => :bold
|
81
107
|
output.fill_color "000000"
|
82
108
|
}
|
83
109
|
|
@@ -89,9 +115,9 @@ module Risu
|
|
89
115
|
end
|
90
116
|
|
91
117
|
#Provides nothing
|
92
|
-
#output.font_size(20) {
|
118
|
+
#output.font_size(20) {
|
93
119
|
# output.fill_color "008000"
|
94
|
-
# output.text "Low Findings", :style => :bold
|
120
|
+
# output.text "Low Findings", :style => :bold
|
95
121
|
# output.fill_color "000000"
|
96
122
|
#}
|
97
123
|
#
|
@@ -1,19 +1,45 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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.
|
15
|
+
|
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.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Templates
|
3
29
|
class FindingsSummaryWithPluginID < Risu::Base::TemplateBase
|
4
|
-
|
30
|
+
|
5
31
|
#
|
6
32
|
#
|
7
33
|
def initialize ()
|
8
|
-
@template_info =
|
9
|
-
{
|
10
|
-
:name => "findings_summary_with_pluginid",
|
11
|
-
:author => "hammackj",
|
12
|
-
:version => "0.0.
|
13
|
-
:description => "
|
34
|
+
@template_info =
|
35
|
+
{
|
36
|
+
:name => "findings_summary_with_pluginid",
|
37
|
+
:author => "hammackj",
|
38
|
+
:version => "0.0.2",
|
39
|
+
:description => "Generates a Findings Summary with Nessus Plugin ID"
|
14
40
|
}
|
15
41
|
end
|
16
|
-
|
42
|
+
|
17
43
|
#
|
18
44
|
#
|
19
45
|
def render(output)
|
@@ -23,7 +49,7 @@ module Risu
|
|
23
49
|
output.font_size(22) do
|
24
50
|
output.text Report.title, :align => :center
|
25
51
|
end
|
26
|
-
|
52
|
+
|
27
53
|
output.font_size(18) do
|
28
54
|
output.text "Findings Summary Report", :align => :center
|
29
55
|
output.text "\n"
|
@@ -32,12 +58,28 @@ module Risu
|
|
32
58
|
|
33
59
|
output.text "\n\n\n"
|
34
60
|
|
35
|
-
output.font_size(20) {
|
36
|
-
output.fill_color "
|
37
|
-
output.text "
|
61
|
+
output.font_size(20) {
|
62
|
+
output.fill_color "9B30FF"
|
63
|
+
output.text "Critical Findings", :style => :bold
|
38
64
|
output.fill_color "000000"
|
39
65
|
}
|
40
66
|
|
67
|
+
Item.critical_risks_unique_sorted.each do |item|
|
68
|
+
name = Plugin.find_by_id(item.plugin_id).plugin_name
|
69
|
+
count = Item.where(:plugin_id => item.plugin_id).count
|
70
|
+
|
71
|
+
output.text "#{count} - #{name} - #{item.plugin_id}"
|
72
|
+
end
|
73
|
+
|
74
|
+
output.start_new_page
|
75
|
+
|
76
|
+
|
77
|
+
output.font_size(20) do
|
78
|
+
output.fill_color "FF0000"
|
79
|
+
output.text "High Findings", :style => :bold
|
80
|
+
output.fill_color "000000"
|
81
|
+
end
|
82
|
+
|
41
83
|
Item.high_risks_unique_sorted.each do |item|
|
42
84
|
name = Plugin.find_by_id(item.plugin_id).plugin_name
|
43
85
|
count = Item.where(:plugin_id => item.plugin_id).count
|
@@ -47,9 +89,9 @@ module Risu
|
|
47
89
|
|
48
90
|
output.start_new_page
|
49
91
|
|
50
|
-
output.font_size(20) {
|
92
|
+
output.font_size(20) {
|
51
93
|
output.fill_color "FF8040"
|
52
|
-
output.text "Medium Findings", :style => :bold
|
94
|
+
output.text "Medium Findings", :style => :bold
|
53
95
|
output.fill_color "000000"
|
54
96
|
}
|
55
97
|
|
@@ -62,9 +104,9 @@ module Risu
|
|
62
104
|
|
63
105
|
output.start_new_page
|
64
106
|
|
65
|
-
output.font_size(20) {
|
107
|
+
output.font_size(20) {
|
66
108
|
output.fill_color "0000FF"
|
67
|
-
output.text "Low Findings", :style => :bold
|
109
|
+
output.text "Low Findings", :style => :bold
|
68
110
|
output.fill_color "000000"
|
69
111
|
}
|
70
112
|
|
@@ -76,9 +118,9 @@ module Risu
|
|
76
118
|
end
|
77
119
|
|
78
120
|
#Provides nothing
|
79
|
-
#output.font_size(20) {
|
121
|
+
#output.font_size(20) {
|
80
122
|
# output.fill_color "008000"
|
81
|
-
# output.text "Low Findings", :style => :bold
|
123
|
+
# output.text "Low Findings", :style => :bold
|
82
124
|
# output.fill_color "000000"
|
83
125
|
#}
|
84
126
|
#
|
@@ -1,3 +1,29 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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.
|
15
|
+
|
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.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Templates
|
3
29
|
class Graphs < Risu::Base::TemplateBase
|
@@ -34,10 +60,12 @@ module Risu
|
|
34
60
|
output.start_new_page
|
35
61
|
|
36
62
|
output.image Item.risks_by_severity_graph, :width => 500, :height => 375, :position => :center
|
63
|
+
output.text Item.risks_by_severity_graph_text
|
37
64
|
|
38
65
|
output.start_new_page
|
39
66
|
|
40
67
|
output.image Item.risks_by_service_graph(10), :width => 500, :height => 375, :position => :center
|
68
|
+
output.text Item.risks_by_service_graph_text
|
41
69
|
|
42
70
|
output.start_new_page
|
43
71
|
|
@@ -50,10 +78,12 @@ module Risu
|
|
50
78
|
output.start_new_page
|
51
79
|
|
52
80
|
output.image Host.other_os_graph, :width => 500, :height => 375, :position => :center
|
81
|
+
output.text Host.other_os_graph_text
|
53
82
|
|
54
83
|
output.start_new_page
|
55
84
|
|
56
85
|
output.image Host.windows_os_graph, :width => 500, :height => 375, :position => :center
|
86
|
+
output.text Host.windows_os_graph_text
|
57
87
|
|
58
88
|
output.start_new_page
|
59
89
|
|
@@ -1,19 +1,45 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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.
|
15
|
+
|
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.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Templates
|
3
29
|
class HostSummary < Risu::Base::TemplateBase
|
4
|
-
|
30
|
+
|
5
31
|
#
|
6
32
|
#
|
7
33
|
def initialize ()
|
8
|
-
@template_info =
|
9
|
-
{
|
10
|
-
:name => "host_summary",
|
11
|
-
:author => "hammackj",
|
12
|
-
:version => "0.0.2",
|
34
|
+
@template_info =
|
35
|
+
{
|
36
|
+
:name => "host_summary",
|
37
|
+
:author => "hammackj",
|
38
|
+
:version => "0.0.2",
|
13
39
|
:description => "Generates a Host Summary Report"
|
14
40
|
}
|
15
41
|
end
|
16
|
-
|
42
|
+
|
17
43
|
#
|
18
44
|
#
|
19
45
|
def render(output)
|
@@ -59,7 +85,7 @@ module Risu
|
|
59
85
|
row(0).style(:font_style => :bold, :background_color => 'D0D0D0')
|
60
86
|
cells.borders = [:top, :bottom, :left, :right]
|
61
87
|
end
|
62
|
-
|
88
|
+
|
63
89
|
output.number_pages "<page> of <total>", :at => [output.bounds.right - 75, 0], :width => 150, :page_filter => :all
|
64
90
|
end
|
65
91
|
end
|