Skip to content
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

app-staging-synthesizer: ecr repo not immutable #26655

Closed
tenjaa opened this issue Aug 7, 2023 · 5 comments · Fixed by #26656
Closed

app-staging-synthesizer: ecr repo not immutable #26655

tenjaa opened this issue Aug 7, 2023 · 5 comments · Fixed by #26656
Labels
@aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@tenjaa
Copy link
Contributor

tenjaa commented Aug 7, 2023

Describe the bug

AWS recommends ECR repos to have tag immutability configured.
The ECR repos created by this module to not do that.

Expected Behavior

The ECR repos created by this module should have tag immutability configured.

Current Behavior

The ECR repos created by this module do not have tag immutability configured.

Reproduction Steps

Deploy a stack with a docker image and have a look at the created repo.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.90.0

Framework Version

No response

Node.js Version

18

OS

OSX

Language

Typescript

Language Version

No response

Other information

No response

@tenjaa tenjaa added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 7, 2023
@github-actions github-actions bot added the @aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package label Aug 7, 2023
@peterwoodworth peterwoodworth added feature-request A feature should be added or improved. and removed bug This issue is a bug. labels Aug 7, 2023
@peterwoodworth
Copy link
Contributor

Is this a recommendation or a requirement? Also, could you share the docs where AWS recommends this?

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Aug 7, 2023
@tenjaa
Copy link
Contributor Author

tenjaa commented Aug 7, 2023

Totally forgot the link: https://docs.aws.amazon.com/securityhub/latest/userguide/ecr-controls.html
It is [ECR.2]

It is marked as should so probably more a recommendation.
But is there any downside in enabling it, given how cdk works? For the normal bootstrap this is also enabled if I remember correctly.

@peterwoodworth
Copy link
Contributor

Thanks, we don't necessarily conform to security hub recommendations I have relabeled this as a feature request.

I don't know of any downsides, and you're right this is enabled in our bootstrap template. But also, it's not enabled by default in our construct

Regardless, thanks for the PR. We can consider it and get back to you

@tenjaa
Copy link
Contributor Author

tenjaa commented Aug 8, 2023

I put it as a bug because I saw that in the past, the CDK team merged a PR explicitly to fix a Security Hub finding.

Would you be more open to a PR to make in configurable?

@mergify mergify bot closed this as completed in #26656 Aug 17, 2023
mergify bot pushed a commit that referenced this issue Aug 17, 2023
Closes #26655

I cannot run the integration tests and therefore cannot update the snapshot :(

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants