Skip to content

Commit 20f2349

Browse files
committed
chore: scope down codebuild project permissions
1 parent 3da8998 commit 20f2349

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

infra/pipeline.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,10 @@ class EcsLocalContainerEndpointsImagePipeline extends cdk.Stack {
101101
}));
102102

103103
verifyProject.addToRolePolicy(new iam.PolicyStatement({
104-
actions: ["ecr:GetAuthorizationToken",
105-
"ecr:BatchCheckLayerAvailability",
106-
"ecr:GetDownloadUrlForLayer",
107-
"ecr:GetRepositoryPolicy",
108-
"ecr:DescribeRepositories",
109-
"ecr:ListImages",
110-
"ecr:DescribeImages",
111-
"ecr:BatchGetImage",
112-
"ecr:InitiateLayerUpload",
113-
"ecr:UploadLayerPart",
114-
"ecr:CompleteLayerUpload",
115-
"ecr:PutImage",
104+
actions: [
116105
"secretsmanager:GetSecretValue",
117106
],
118-
resources: ["*"]
107+
resources: ["com.amazonaws.ec2.madison.dockerhub.amazon-ecs-local-container-endpoints.credentials"]
119108
}));
120109

121110
const buildAction = new actions.CodeBuildAction({

0 commit comments

Comments
 (0)