Skip to content

fix: prevent prototype pollution in 2 APIs#37453

Merged
mergify[bot] merged 3 commits into
mainfrom
huijbers/proto-poll2
Mar 31, 2026
Merged

fix: prevent prototype pollution in 2 APIs#37453
mergify[bot] merged 3 commits into
mainfrom
huijbers/proto-poll2

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Mar 31, 2026

Prevent prototype pollution in a couple of APIs:

  • Fact.register()
  • cfnResource.addOverride()

Prototype pollution is not a realistic attack on CDK, since values never come from untrusted sources. Nevertheless, the presence of possible prototype pollution sites makes for a fertile ground for security reports that we then have to look into.

This PR replaces #37408, in which I got bamboozled by Kiro into identifying a lot of non-vulnerable locations.

Fix a couple of sites here, and also add tests to confirm that a number of other sites are already protected.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@rix0rrr rix0rrr requested a review from a team as a code owner March 31, 2026 13:50
@aws-cdk-automation aws-cdk-automation requested a review from a team March 31, 2026 13:50
@github-actions github-actions Bot added the p2 label Mar 31, 2026
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label Mar 31, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Mar 31, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 31, 2026 14:00

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Mar 31, 2026
@rix0rrr rix0rrr changed the title fix: prevent prototype pollution in a number of locations fix: prevent prototype pollution in 2 APIs Mar 31, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 31, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 31, 2026

Merge Queue Status

  • Entered queue2026-03-31 14:34 UTC · Rule: default-squash
  • Checks passed · in-place
  • Merged2026-03-31 15:49 UTC · at 5ed16244d57b6c990704fb780cc8a7be8c8a594c

This pull request spent 1 hour 14 minutes 55 seconds in the queue, including 30 minutes 16 seconds running CI.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 31, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify Bot merged commit 1016537 into main Mar 31, 2026
19 of 20 checks passed
@mergify mergify Bot deleted the huijbers/proto-poll2 branch March 31, 2026 15:49
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants