Skip to content

Validate that webhook secrets are non-empty - #1960

Open
xavdid wants to merge 1 commit into
masterfrom
RUN_DEVSDK-2953
Open

Validate that webhook secrets are non-empty#1960
xavdid wants to merge 1 commit into
masterfrom
RUN_DEVSDK-2953

Conversation

@xavdid

@xavdid xavdid commented Sep 8, 2026

Copy link
Copy Markdown
Member

Why?

Fixes a potential security issue where, if the user passes an empty string into the event validation functions, the SDK would still generate a signature. If an attacker knew that a victim was inadvertently using an empty webhook secret, the attacker could send signed webhooks (using the empty secret) that a victim's integration would treat as valid.

The solution is to throw an error if the webhook secret is empty. This ensures all payloads are validated against an actual secret.

We also updated our examples to have better defaults, helping users to avoid this issue.

What?

  • verify that a webhook secret is non-empty & non-null when verifying a webhook
  • update examples
  • add tests

See Also

@xavdid
xavdid marked this pull request as ready for review September 9, 2026 00:16
@xavdid
xavdid requested a review from a team as a code owner September 9, 2026 00:16
@xavdid
xavdid requested review from jar-stripe and removed request for a team September 9, 2026 00:16
@xavdid
xavdid enabled auto-merge (squash) September 9, 2026 00:16
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.

1 participant