awslabs / aws-config-rules

[Node, Python, Java] Repository of sample Custom Rules for AWS Config.
http://aws.amazon.com/config/
Creative Commons Zero v1.0 Universal
1.58k stars 851 forks source link

Add rule IAM_TRUSTED_ENTITY_CHECK #355

Open aao4sey opened 3 years ago

aao4sey commented 3 years ago

I confirm these files are made available under CC0 1.0 Universal (https://creativecommons.org/publicdomain/zero/1.0/legalcode)

Issue #, if available:

Description of changes: It's a rule to detect trusted entities which trusts whole of another AWS Account. It retrieves IAM Role list in the account and checks trusted entity in each roles. If a role has policy which trusts whole of another AWS Account (like a arn:aws:iam::123456789012:root), the role is evaluated as NON_COMPLIANT.