Class: SecurityGroupRuleDescriptionRule

Inherits:
BaseRule show all
Defined in:
lib/cfn-nag/custom_rules/SecurityGroupRuleDescriptionRule.rb

Instance Method Summary collapse

Methods inherited from BaseRule

#audit

Instance Method Details

#audit_impl(cfn_model) ⇒ Object


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

def audit_impl(cfn_model)
  violating_security_groups?(cfn_model) +
    violating_ingress?(cfn_model) +
    violating_egress?(cfn_model)
end

#rule_idObject


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

def rule_id
  'W36'
end

#rule_textObject


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

def rule_text
  'Security group rules without a description obscure their purpose and may '\
  'lead to bad practices in ensuring they only allow traffic from the ports '\
  'and sources/destinations required.'
end

#rule_typeObject


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

def rule_type
  Violation::WARNING
end