class Risu::Templates::TalkingPoints

Public Class Methods

new() click to toggle source

Initializes the Talking Points Report

# File lib/risu/templates/talking_points.rb, line 28
def initialize
        @template_info =
        {
                :name => "talking_points",
                :author => "hammackj",
                :version => "0.0.2",
                :renderer => "PDF",
                :description => "Generates a Talking Points Report"
        }
end

Public Instance Methods

render(output) click to toggle source

Renders the Talking Points Report

# File lib/risu/templates/talking_points.rb, line 40
def render output
        report_classification

        report_title Report.title
        report_subtitle "Talking Points Report"
        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"

        # Number of hosts / score
        @output.text "There were #{Host.count} hosts identified, containing #{Item.critical_risks.to_a.count + Item.high_risks.to_a.count} critical and high risks findings. Of those there were #{Item.critical_risks.to_a.count} Critical risks, and #{Item.high_risks.to_a.count} High risks."

        @output.text "These critical and highs were discovered on #{Host.unique_hosts_with_critical_and_high_count} unique hosts. #{Item.risk_percent_rounded_text} of the total assessed computers were found to have an critical or high finding."

        # @TODO need vulnerable host count

        @output.text "\n\n\n"

        # Top Hosts with Findings
        #@TODO need this call

        @output.text "\n\n\n"

        # Notable Findings
        Item.top_10_table(@output)


        # Plugin_output keyword search?

        @output.number_pages "<page> of <total>", :at => [output.bounds.right - 75, 0], :width => 150, :page_filter => :all
end