def check_star_assume_role_policy(self, iamrole_item):
        tag = "{0} allows assume-role from anyone".format(self.i_am_singular)

        def check_statement(statement):
            action = statement.get("Action", None)
            if action and action == "sts:AssumeRole":
                effect = statement.get("Effect", None)
                if effect and effect == "Allow":
                    principal = statement.get("Principal", None)
                    if not principal:
                        return
                    if type(principal) is dict:
                        aws = principal.get("AWS", None)
                        if aws and aws == "*":
                            self.add_issue(10, tag, iamrole_item,
                                           notes=json.dumps(statement))
                    elif aws and type(aws) is list:
                        for entry in aws:
                            if entry == "*":
                                self.add_issue(10, tag, iamrole_item,
                                               notes=json.dumps(statement))

        assume_role_policy = iamrole_item.config.get("assume_role_policy_document", {})
        statement = assume_role_policy.get("Statement", [])
        if type(statement) is list:
            for single_statement in statement:
                check_statement(single_statement)
        elif type(statement) is dict:
            check_statement(statement)
alert when an IAM Role has an assume_role_policy_document but using a star
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/auditors/iam/iam_role.py/IAMRoleAuditor.check_star_assume_role_policy