GitHub OIDC federated role allows assumption from any repository in an org
What it checks
GitHub OIDC federated role allows assumption from any repository in an org
Where it applies
Terraform: aws_iam_role
CloudFormation: AWS::IAM::Role
How to fix it
- Replace the repository wildcard ("repo:my-org/*", or a prefix such as "repo:my-org/my-repo*") with the repository name written out in full: "repo:my-org/my-specific-repo:*".
- If multiple repos legitimately need this role, create a separate role per repo — each scoped to its repository path.