Class: UserHasInlinePolicyRule
- Defined in:
- lib/cfn-nag/custom_rules/UserHasInlinePolicyRule.rb
Instance Method Summary collapse
Methods inherited from BaseRule
Instance Method Details
#audit_impl(cfn_model) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/cfn-nag/custom_rules/UserHasInlinePolicyRule.rb', line 18 def audit_impl(cfn_model) violating_users = cfn_model.iam_users.select do |iam_user| iam_user.policies.size > 0 end violating_users.map { |violating_user| violating_user.logical_resource_id } end |
#rule_id ⇒ Object
14 15 16 |
# File 'lib/cfn-nag/custom_rules/UserHasInlinePolicyRule.rb', line 14 def rule_id 'F10' end |
#rule_text ⇒ Object
6 7 8 |
# File 'lib/cfn-nag/custom_rules/UserHasInlinePolicyRule.rb', line 6 def rule_text 'IAM user should not have any inline policies. Should be centralized Policy object on group' end |
#rule_type ⇒ Object
10 11 12 |
# File 'lib/cfn-nag/custom_rules/UserHasInlinePolicyRule.rb', line 10 def rule_type Violation::FAILING_VIOLATION end |