grant codebuild the ability to assume audit role

This commit is contained in:
Mr. Secure
2019-10-11 21:46:20 -05:00
parent 70304dc2a2
commit 64667ea9d0

View File

@@ -26,14 +26,19 @@ Resources:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
-
Effect: "Allow"
- Effect: "Allow"
Principal:
AWS: # TODO: review permissions to see if this can be narrowed down - code build only perhaps
- !Sub "arn:aws:iam::${AuditorAccountId}:root"
- !Sub "arn:aws:iam::${AuditorAccountId}:role${AuditRolePathName}"
Action:
- "sts:AssumeRole"
- Effect: "Allow"
Principal:
Service:
- "codebuild.amazonaws.com"
Action:
- "sts:AssumeRole"
# TODO: restrict to only AuditorAccount only
Policies:
- PolicyName: "ProwlerPolicyAdditions"
PolicyDocument: