Class: OpsWorksStackRdsDbInstancePasswordRule

Inherits:
BaseRule
  • Object
show all
Defined in:
lib/cfn-nag/custom_rules/OpsWorksStackRdsDbInstancePasswordRule.rb

Instance Method Summary collapse

Methods inherited from BaseRule

#audit

Instance Method Details

#audit_impl(cfn_model) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/cfn-nag/custom_rules/OpsWorksStackRdsDbInstancePasswordRule.rb', line 23

def audit_impl(cfn_model)
  opsworks_stacks = cfn_model.resources_by_type('AWS::OpsWorks::Stack')
  violating_opsworks_stacks = opsworks_stacks.select do |opsworks_stack|
    violating_db_instances?(cfn_model, opsworks_stack)
  end
  violating_opsworks_stacks.map(&:logical_resource_id)
end

#rule_idObject



19
20
21
# File 'lib/cfn-nag/custom_rules/OpsWorksStackRdsDbInstancePasswordRule.rb', line 19

def rule_id
  'F54'
end

#rule_textObject



10
11
12
13
# File 'lib/cfn-nag/custom_rules/OpsWorksStackRdsDbInstancePasswordRule.rb', line 10

def rule_text
  'OpsWorks Stack RDS DBInstance Password property should not show password ' +
  'in plain text, resolve an unsecure ssm string, or have a default value for parameter.'
end

#rule_typeObject



15
16
17
# File 'lib/cfn-nag/custom_rules/OpsWorksStackRdsDbInstancePasswordRule.rb', line 15

def rule_type
  Violation::FAILING_VIOLATION
end