'alert when an IAM Object has a policy allowing \'*\'.'

def library_check_iamobj_has_star_privileges(self, iamobj_item, policies_key='InlinePolicies', multiple_policies=True):

    tag = '{0}    has    full    admin    privileges.'.format(self.i_am_singular)
    def check_statement(statement):
        if (statement['Effect'] == 'Allow'):
            if (('Action' in statement) and (type(statement['Action']) is list)):
                for action in statement['Action']:
                    if (action == '*'):
                        self.add_issue(10, tag, iamobj_item, notes=json.dumps(statement))
            elif (('Action' in statement) and (statement['Action'] == '*')):
                self.add_issue(10, tag, iamobj_item, notes=json.dumps(statement))
    if multiple_policies:
        _iterate_over_sub_policies(iamobj_item.config.get(policies_key, {}), check_statement)
    else:
        _iterate_over_statements(iamobj_item.config[policies_key], check_statement)
