Skip to content

fix(pipelines): CodeBuild Action role can be assumed by too many identities#25318

Merged
mergify[bot] merged 2 commits intov1-mainfrom
huijbers/backport-pipelines
Apr 26, 2023
Merged

fix(pipelines): CodeBuild Action role can be assumed by too many identities#25318
mergify[bot] merged 2 commits intov1-mainfrom
huijbers/backport-pipelines

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 26, 2023

Backport of #25316.

CDK Pipelines creates a single Role which has permissions to start all CodeBuild jobs. The AssumeRolePolicy for this Role contained a mistake, which allowed all roles in the same account with appropriate sts:AssumeRole permissions to assume the Role.

Fix this by limiting the AssumeRolePolicy to the actual pipeline's execution role, which we have so we can reference directly.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…tities

Backport of #25316.

CDK Pipelines creates a single Role which has permissions to start all CodeBuild jobs. The AssumeRolePolicy for this Role contained a mistake, which allowed all roles in the same account with appropriate sts:AssumeRole permissions to assume the Role.

Fix this by limiting the AssumeRolePolicy to the actual pipeline's execution role, which we have so we can reference directly.
@rix0rrr rix0rrr requested a review from a team April 26, 2023 15:13
@gitpod-io
Copy link

gitpod-io bot commented Apr 26, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team April 26, 2023 15:13
@github-actions github-actions bot added the p2 label Apr 26, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 26, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: fc84d8d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 8ceae2e into v1-main Apr 26, 2023
@mergify mergify bot deleted the huijbers/backport-pipelines branch April 26, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants