-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(codebuild): ReportGroup grants test permissions when set to CODE_COVERAGE #21534
Comments
Yeah it looks like this got overlooked when we added the code coverage option. We can adjust the grantwrite method to consider what type of ReportGroup is getting created here aws-cdk/packages/@aws-cdk/aws-codebuild/lib/report-group.ts Lines 42 to 51 in 16c0c98
I'm marking this as p2, which means we won't be able to get to this issue soon, but are willing to review any PRs for this issue 🙂 |
@peterwoodworth Since I introduced this bug, I will take care of it. 🤕 |
Thanks a bunch @daschaa 🙂 |
…_COVERAGE (#21656) Fixes #21534 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…_COVERAGE (aws#21656) Fixes aws#21534 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
grantWrite on a ReportGroup only applies
'codebuild:CreateReport', 'codebuild:UpdateReport', 'codebuild:BatchPutTestCases'
. If you use a ReportGroup with type: "CODE_COVERAGE" it still sets those actions as allowed, but misses the'codebuild:BatchPutCodeCoverages'
.Expected Behavior
new ReportGroup(...,{type: ReportGroupType.TEST} ).grantWrite(codeBuildStep)
should add a policy statement with
'codebuild:CreateReport', 'codebuild:UpdateReport', 'codebuild:BatchPutTestCases'
while
new ReportGroup(...,{type: ReportGroupType.CODE_COVERAGE} ).grantWrite(codeBuildStep)
should add a policy statement with
'codebuild:CreateReport', 'codebuild:UpdateReport', 'codebuild:BatchPutCodeCoverages'
Current Behavior
new ReportGroup(...,{type: ReportGroupType.CODE_COVERAGE} ).grantWrite(codeBuildStep)
adds a policy statement with
'codebuild:CreateReport', 'codebuild:UpdateReport', 'codebuild:BatchPutTestCases'
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.37.0
Framework Version
No response
Node.js Version
16.15.1
OS
Ubuntu 22.04 LTS (Linux 5.15.0-43)
Language
Typescript
Language Version
4.7.4
Other information
No response
The text was updated successfully, but these errors were encountered: