'alert if EC2 SG contains RFC1918 CIDRS'

def check_securitygroup_ec2_rfc1918(self, sg_item):

    tag = 'Non-VPC    Security    Group    contains    private    RFC-1918    CIDR'
    severity = 5
    if sg_item.config.get('vpc_id', None):
        return
    multiplier = _check_empty_security_group(sg_item)
    for rule in sg_item.config.get('rules', []):
        cidr = rule.get('cidr_ip', None)
        if (cidr and check_rfc_1918(cidr)):
            self.add_issue((severity * multiplier), tag, sg_item, notes=cidr)
