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

Secrets Manager: Security issue when adding rotationLambda with CT Hooks #29791

Closed
JMJHOX opened this issue Apr 11, 2024 · 3 comments
Closed
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@JMJHOX
Copy link

JMJHOX commented Apr 11, 2024

Describe the bug

This bug has been previously raised by #28406 and closed for inactivity.

But in my case, it is reflected when you enable an CT Guardrail that checks the rule [CT.LAMBDA.PR.2] is complying proactively.
That is, deploying a CFN Hook into your account that checks if your lambdas deployed have the property called "SourceAccount" in the service principal, for this case It fails when I try to deploy a lambda rotation with CDK.

Expected Behavior

I should be allowed to add or override the service principal created, like was discussed in the old thread.

Current Behavior

It creates the resource without the required fields, causing it to fail when the hook checks on the creation process.

Reproduction Steps

add a rotation lambda to secrets manager, enable ct guardrail for rule [CT.LAMBDA.PR.2] and you are good to go

Possible Solution

Continue the previous PR.
I´d like to check the old PR and go on with it, I´m interested in this issue is fixed.

Additional Information/Context

Not much

CDK CLI Version

v2.136.0

Framework Version

No response

Node.js Version

v16.20.0

OS

windows

Language

TypeScript

Language Version

No response

Other information

No response

@JMJHOX JMJHOX added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 11, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Apr 11, 2024
@pahud
Copy link
Contributor

pahud commented Apr 11, 2024

Hi

Can you provide minimal code snippets in the Reproduction Steps that reproduces this issue?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 11, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 13, 2024
@github-actions github-actions bot added closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Apr 18, 2024
@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants