Ensure IAM policies with wildcard (*) resource and NotAction are not attached or used
Pass role with star in resource and NotAction: Using a resource with wildcards (*) and NotAction can be overly permissive because it allows iam:PassRole permissions on all resources.
In AWS Console -
Sign in to the AWS console and go to the IAM console.
In the Navigation pane, select Policies.
In the list of policies, select the policy to edit.
Select the Permissions tab, and then choose Edit policy.
On the review page, review the changes and click Save.
In Terraform -
In the aws_iam_policy, aws_iam_role_policy, aws_iam_group_policy, and aws_iam_user_policy resources, edit the policy field so that NotAction is not used with iam:PassRole, iam:CreateServiceLinkedRole, or a wildcard (*).
Update the Resource ARN list to use specific IDs rather than a wildcard.
Update the Action list to a specific set of IAM actions. For more information on how to effectively write an IAM policy see the AWS and Terraform documentation.