-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws-lambda-nodejs: banner and footer values are not escaped #13576
Comments
+ |
Can this be closed? |
@eladb Has it been fixed? |
No, apologies I misunderstood @jogold's comment. Contributions are welcome. Keeping open |
@eladb it's an easy fix here but what do you suggest for the breaking change? how should we handle |
Aren't we checking that we use a compatible major version? |
Yes but |
I don't see any other reliable way. Perhaps we can add a switch to opt-out of version check if people insist they want to use a newer version |
@gurshafriri Are you on CDK.dev slack? I'd like to discuss this with you directly |
@nihalgonsalves we have considered this in the past and decided that this is not the best approach. @jogold can shed some light. |
@jogold let's first escape the shell command. I think As for breaking changes in esbuild, I believe in this case, we don't have to break the construct API, correct? Just use the new API from esbuild. |
Will have a look.
Correct because we don't care about |
Escape values and use the new CLI options. Closes #13576 BREAKING CHANGE: using `banner` and `footer` now requires `esbuild` >= 0.9.0 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Escape values and use the new CLI options. Closes aws#13576 BREAKING CHANGE: using `banner` and `footer` now requires `esbuild` >= 0.9.0 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Source:
aws-cdk/packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts
Lines 156 to 157 in 8b00de0
The values for
banner
andfooter
are not properly escaped for shell execution, resulting in errors, and potentially a command injection!Reproduction Steps
What did you expect to happen?
Values to be escaped.
What actually happened?
Ran as is, without escaping.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: