Free plan Signups are open now. The full audytx engine — Terraform and CloudFormation — is live. The Free plan is 100 scans a month and stays free — paid tiers arrive Nov 01, 2026 from $20/month for unlimited repositories. Try it on your own code.

IAM role trust policy should restrict principal to known sources

AWS_IAM_005 CRITICAL Security

What it checks

IAM role trust policy should restrict principal to known sources

Where it applies

Terraform: aws_iam_role

CloudFormation: AWS::IAM::Role

How to fix it

  1. Restrict Principal to specific account IDs or service principals (e.g. Service = "lambda.amazonaws.com")
  2. For third-party cross-account access, use an sts:ExternalId unique to each customer and supplied by the third party; it is not a secret

Frameworks

These mappings are advisory, not an attestation of compliance.

Vendor documentation

All rules