Class: UserMissingGroupRule
- Defined in:
- lib/cfn-nag/custom_rules/UserMissingGroupRule.rb
Instance Method Summary collapse
Methods inherited from BaseRule
Instance Method Details
#audit_impl(cfn_model) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cfn-nag/custom_rules/UserMissingGroupRule.rb', line 18 def audit_impl(cfn_model) logical_resource_ids = [] cfn_model.iam_users.each do |iam_user| if iam_user.groups.empty? logical_resource_ids << iam_user.logical_resource_id end end logical_resource_ids end |
#rule_id ⇒ Object
14 15 16 |
# File 'lib/cfn-nag/custom_rules/UserMissingGroupRule.rb', line 14 def rule_id 'F2000' end |
#rule_text ⇒ Object
6 7 8 |
# File 'lib/cfn-nag/custom_rules/UserMissingGroupRule.rb', line 6 def rule_text 'User is not assigned to a group' end |
#rule_type ⇒ Object
10 11 12 |
# File 'lib/cfn-nag/custom_rules/UserMissingGroupRule.rb', line 10 def rule_type Violation::FAILING_VIOLATION end |