class Risu::Templates::ExecSummary
Public Class Methods
new()
click to toggle source
# File lib/risu/templates/exec_summary.rb, line 29 def initialize @template_info = { :name => "exec_summary", :author => "hammackj", :version => "0.0.5", :renderer => "PDF", :description => "Generates a simple executive summary." } end
Public Instance Methods
render(output)
click to toggle source
# File lib/risu/templates/exec_summary.rb, line 42 def render output output.text Report.classification.upcase, :align => :center output.text "\n" report_title Report.title report_subtitle "Executive Summary" report_author "This report was prepared by\n#{Report.author}" output.text "\n\n\n" output.text "Scan Date:", :style => :bold output.text "#{Report.scan_date}" output.text "\n" output.text "This report contains the results of a security audit performed on #{Report.scan_date}." if Report.owner.nil? or Report.network.nil? or Report.location.nil? output.text "It contains confidential information about the state of your network." else output.text "It contains confidential information about the state of #{Report.owner}'s #{Report.network} network at #{Report.location}." end output.text "Access to this information by unauthorized personnel may allow them to compromise said network.\n\n" output.text "A total of #{Host.count} hosts were found and scanned for vulnerabilities.\n\n" 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" output.text "Scan Statistics", :style => :bold output.text "\n" output.table([[ "Number of hosts", "Number of risks", "Critical Risks", "High Risks", "Medium Risks", "Low Risks", "Info Risks"], [ Host.count, Item.risks.count, Item.critical_risks.count, Item.high_risks.count, Item.medium_risks.count, Item.low_risks.count, Item.info_risks.count]], :cell_style => { :padding =>12 }, :width => output.bounds.width) output.text "\n\n\n" output.text "Graphs of key finding statistics", :style => :bold output.text "\n\n\n" cury = output.y output.image Item.risks_by_severity_graph, :width => 250, :at => [output.bounds.left, cury] output.image Host.top_vuln_graph(10), :width => 250, :at => [output.bounds.right - 250, cury] output.move_down 50 output.start_new_page cury = output.y output.image Item.risks_by_service_graph(10), :width => 250, :at => [output.bounds.left, cury] output.image Host.other_os_graph, :width => 250, :at => [output.bounds.right - 250, cury] output.move_down 250 cury = output.y output.image Host.windows_os_graph, :width => 250, :at => [output.bounds.left, cury] output.image Item.stigs_severity_graph, :width => 250, :at => [output.bounds.right - 250, cury] end