# frozen_string_literal: true require_relative "security/main" require_relative "databases/main" require_relative "instances_and_addons/main" require_relative "misc/main" module Neetob class CLI module MonthlyAudit class Perform < CLI::Base attr_accessor :sandbox, :month def initialize(month, sandbox = false) super() @month = month @sandbox = sandbox end def run Thread.current[:audit_mode] = true markdown_file_name = "audit-report-#{DateTime.now.to_i}.md" Thread.current[:markdown_file_name] = markdown_file_name ui.success("## Starting the audit for #{month}") ui.info "\n" Security::Main.new.run ui.info "\n" Databases::Main.new.run ui.info "\n" InstancesAndAddons::Main.new.run ui.info "\n" Misc::Main.new.run ui.info "\n" `rm -rf /tmp/neetob` ui.success("## Audit for #{month} completed successfully.") ui.success("## Audit report is written to #{markdown_file_name}") ui.success("## Please update the manual audit part and post the audit in Github.") end end end end end