Skip to content

Commit

Permalink
[fix] prevent root actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jplock committed Feb 12, 2025
1 parent 5aafdc2 commit aa74bce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ Resources:
Action: "*"
Resource: "*"
Condition:
StringLike:
ArnLike:
"aws:PrincipalArn": !Sub "arn:${AWS::Partition}:iam::*:root"
"Null":
"aws:AssumedRoot": "true"
- Sid: DenyLeaveOrganization
Effect: Deny
Action: "organizations:LeaveOrganization"
Expand Down

0 comments on commit aa74bce

Please sign in to comment.