'alert when an IAM Object has ec2:AuthorizeSecurityGroupEgress or ec2:AuthorizeSecurityGroupIngress.'

def check_security_group_permissions(self, iam_object):

    if ((not is_aws_managed_policy(iam_object)) or (is_aws_managed_policy(iam_object) and has_attached_resources(iam_object))):
        self.library_check_iamobj_has_security_group_permissions(iam_object, policies_key='policy', multiple_policies=False)
