INNER CODE UNIT · Ruby

audit_aggregate_across_files

stelligent/cfn_nag · lib/cfn-nag/cfn_nag.rb:55

  def audit_aggregate_across_files(input_path:,
                                   parameter_values_path: nil,
                                   condition_values_path: nil,
                                   template_pattern: DEFAULT_TEMPLATE_PATTERN)
    parameter_values_string = parameter_values_path.nil? ? nil : File.read(parameter_values_path)
    condition_values_string = condition_values_path.nil? ? nil : File.read(condition_values_path)

    templates = TemplateDiscovery.new.discover_templates(input_json_path: input_path,
                                                         template_pattern: template_pattern)
    aggregate_results = []
    templates.each do |template|
      aggregate_results << {
        filename: template,
        file_results: audit(cloudformation_string: File.read(template),
                            parameter_values_string: parameter_values_string,
                            condition_values_string: condition_values_string)
      }
    end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…