Commit c98377b
fix(aws-serverless): Remove possible prototype pollution source (#14110)
Fixes
[https://github.com/getsentry/sentry-javascript/security/code-scanning/307](https://github.com/getsentry/sentry-javascript/security/code-scanning/307)
To fix the prototype pollution issue, we need to ensure that the
`handlerName` does not include any special properties like `__proto__`,
`constructor`, or `prototype`. We can achieve this by adding a check to
filter out these properties before performing the assignment.
1. Add a check to ensure `handlerName` does not include `__proto__`,
`constructor`, or `prototype`.
2. If `handlerName` includes any of these properties, log an error and
return without making the assignment.
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>1 parent a091bdd commit c98377b
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
| |||
0 commit comments