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

chore: reduce default max payload size in webhooks to 50MB #21101

Merged

Conversation

pasha-codefresh
Copy link
Member

During the implementation of GHSA-jmvp-698c-4x3w, we initially set the payload size limit to 1GB by default. However, after further discussion with the SIG-Security group, we decided to reduce this limit to 50MB, as 1GB was still considered too large for a payload size.

Signed-off-by: pashakostohrys <pavel@codefresh.io>
@pasha-codefresh pasha-codefresh requested a review from a team as a code owner December 9, 2024 10:26
Copy link

bunnyshell bot commented Dec 9, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link
Contributor

@svghadi svghadi left a comment

Choose a reason for hiding this comment

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

Thanks @pasha-codefresh. Suggesting few additional changes.

Doc update:

  • # The maximum size of the payload that can be sent to the webhook server.
    webhook.maxPayloadSizeMB: "1024"
  • To prevent DDoS attacks with unauthenticated webhook events (the `/api/webhook` endpoint currently lacks rate limiting protection), it is recommended to limit the payload size. You can achieve this by configuring the `argocd-cm` ConfigMap with the `webhook.maxPayloadSizeMB` attribute. The default value is 1GB.

and a nit for consistency

@pasha-codefresh
Copy link
Member Author

Thanks @pasha-codefresh. Suggesting few additional changes.

Doc update:

  • # The maximum size of the payload that can be sent to the webhook server.
    webhook.maxPayloadSizeMB: "1024"
  • To prevent DDoS attacks with unauthenticated webhook events (the `/api/webhook` endpoint currently lacks rate limiting protection), it is recommended to limit the payload size. You can achieve this by configuring the `argocd-cm` ConfigMap with the `webhook.maxPayloadSizeMB` attribute. The default value is 1GB.

and a nit for consistency

Oh, thank you!

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@96d0226). Learn more about missing BASE report.
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #21101   +/-   ##
=========================================
  Coverage          ?   53.47%           
=========================================
  Files             ?      324           
  Lines             ?    55581           
  Branches          ?        0           
=========================================
  Hits              ?    29721           
  Misses            ?    23255           
  Partials          ?     2605           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: pashakostohrys <pavel@codefresh.io>
@pasha-codefresh pasha-codefresh requested a review from a team as a code owner December 9, 2024 11:51
@pasha-codefresh
Copy link
Member Author

@svghadi fixed

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Signed-off-by: pashakostohrys <pavel@codefresh.io>
Copy link
Contributor

@svghadi svghadi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

LGTM!!

@ishitasequeira ishitasequeira merged commit 90a1489 into argoproj:master Dec 10, 2024
27 checks passed
GuySaar8 pushed a commit to GuySaar8/argo-cd that referenced this pull request Dec 12, 2024
…21101)

* chore: reduce default max payload size in webhooks to 50MB

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* chore: reduce default max payload size in webhooks to 50MB

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* chore: reduce default max payload size in webhooks to 50MB

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* chore: reduce default max payload size in webhooks to 50MB

Signed-off-by: pashakostohrys <pavel@codefresh.io>

---------

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants