Class: CfnNagConfig

Inherits:
Object show all
Defined in:
lib/cfn-nag/cfn_nag_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(profile_definition: nil, deny_list_definition: nil, rule_directory: nil, allow_suppression: true, print_suppression: false, isolate_custom_rule_exceptions: false, fail_on_warnings: false, ignore_fatal: false, rule_repository_definitions: [], rule_arguments: {}, rule_directory_recursive: false) ⇒ CfnNagConfig

rubocop:disable Metrics/ParameterLists



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/cfn-nag/cfn_nag_config.rb', line 5

def initialize(profile_definition: nil,
               deny_list_definition: nil,
               rule_directory: nil,
               allow_suppression: true,
               print_suppression: false,
               isolate_custom_rule_exceptions: false,
               fail_on_warnings: false,
               ignore_fatal: false,
               rule_repository_definitions: [],
               rule_arguments: {},
               rule_directory_recursive: false)
  @rule_directory = rule_directory
  @custom_rule_loader = CustomRuleLoader.new(
    rule_directory: rule_directory,
    allow_suppression: allow_suppression,
    print_suppression: print_suppression,
    isolate_custom_rule_exceptions: isolate_custom_rule_exceptions,
    rule_repository_definitions: rule_repository_definitions,
    rule_directory_recursive: rule_directory_recursive
  )
  @profile_definition = profile_definition
  @deny_list_definition = deny_list_definition
  @fail_on_warnings = fail_on_warnings
  @rule_repositories = rule_repositories
  @rule_arguments = rule_arguments
  @ignore_fatal = ignore_fatal
end

Instance Attribute Details

#custom_rule_loaderObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def custom_rule_loader
  @custom_rule_loader
end

#deny_list_definitionObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def deny_list_definition
  @deny_list_definition
end

#fail_on_warningsObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def fail_on_warnings
  @fail_on_warnings
end

#ignore_fatalObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def ignore_fatal
  @ignore_fatal
end

#profile_definitionObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def profile_definition
  @profile_definition
end

#rule_argumentsObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def rule_arguments
  @rule_arguments
end

#rule_directoryObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def rule_directory
  @rule_directory
end

#rule_repositoriesObject (readonly)

rubocop:enable Metrics/ParameterLists



34
35
36
# File 'lib/cfn-nag/cfn_nag_config.rb', line 34

def rule_repositories
  @rule_repositories
end