Skip to content

fix: Require signatures for ssl_check request verification#1495

Merged
WilliamBergamin merged 2 commits into
slackapi:mainfrom
homanp:codex/fix-ssl-check-request-verification-bypass
May 15, 2026
Merged

fix: Require signatures for ssl_check request verification#1495
WilliamBergamin merged 2 commits into
slackapi:mainfrom
homanp:codex/fix-ssl-check-request-verification-bypass

Conversation

@homanp
Copy link
Copy Markdown
Contributor

@homanp homanp commented May 8, 2026

Summary

  • stop RequestVerification from skipping HMAC validation solely because a form body contains ssl_check=1
  • keep the existing Socket Mode verification skip
  • add regression coverage for sync, async, and WSGI dispatch paths

Why

When ssl_check_enabled=False, the SSL-check middleware does not intercept ssl_check=1 requests. Request verification still needs to authenticate those HTTP requests before they can reach normal middleware or slash command listeners.

Fixes #1494.

Testing

  • ./scripts/run_tests.sh "tests/slack_bolt/middleware/request_verification/test_request_verification.py tests/slack_bolt_async/middleware/request_verification/test_request_verification.py tests/scenario_tests/test_slash_command.py tests/scenario_tests_async/test_slash_command.py tests/adapter_tests/wsgi/test_wsgi_http.py"
  • ./scripts/lint.sh --no-install
  • ./scripts/run_mypy.sh --no-install

@salesforce-cla
Copy link
Copy Markdown

salesforce-cla Bot commented May 8, 2026

Thanks for the contribution! Before we can merge this, we need @homanp to sign the Salesforce Inc. Contributor License Agreement.

@homanp homanp marked this pull request as ready for review May 8, 2026 06:10
@homanp homanp requested a review from a team as a code owner May 8, 2026 06:10
@homanp homanp changed the title Require signatures for ssl_check request verification fix: Require signatures for ssl_check request verification May 8, 2026
@homanp
Copy link
Copy Markdown
Contributor Author

homanp commented May 8, 2026

CLA was signed but not showing up here.

@homanp
Copy link
Copy Markdown
Contributor Author

homanp commented May 8, 2026

@WilliamBergamin found this as well, not sure if this was "by-design" or not but worth taking a look.

Copy link
Copy Markdown
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

This is another awesome find 💯 🚀

Reproducing this locally and testing it out took me longer then I want to admit, but changes look good to me 🥇 thanks for adding these unit tests, they will prevent us form introducing similar behavior in the future

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (b0eda44) to head (e6ebdbb).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1495   +/-   ##
=======================================
  Coverage   91.30%   91.30%           
=======================================
  Files         228      228           
  Lines        7271     7271           
=======================================
  Hits         6639     6639           
  Misses        632      632           

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

@WilliamBergamin
Copy link
Copy Markdown
Contributor

WilliamBergamin commented May 15, 2026

This might of been by design to allows users that disable SslCheck middleware to somehow handle these requests manually through a handler 🤔 this feel like a super edge case that leaves the door wide open

User that want to handle their own ssl check logic are able to do so in a global middleware

Its also safe to assume that users that disable SslCheck middleware are dealing with advanced use cases and know what they are doing

@homanp
Copy link
Copy Markdown
Contributor Author

homanp commented May 15, 2026

This might of been by design to allows users that disable SslCheck middleware to somehow handle these requests manually through a handler 🤔 this feel like a super edge case that leaves the door wide open

User that want to handle their own ssl check logic are able to do so in a global middleware

Its also safe to assume that users that disable SslCheck middleware are dealing with advanced use cases and know what they are doing

Hmm, do you have those use cases?

@homanp
Copy link
Copy Markdown
Contributor Author

homanp commented May 15, 2026

This is another awesome find 💯 🚀

Reproducing this locally and testing it out took me longer then I want to admit, but changes look good to me 🥇 thanks for adding these unit tests, they will prevent us form introducing similar behavior in the future

Happy to help

@WilliamBergamin WilliamBergamin added python Pull requests that update Python code semver:patch security and removed improvement labels May 15, 2026
@WilliamBergamin WilliamBergamin added this to the 1.29.0 milestone May 15, 2026
@WilliamBergamin WilliamBergamin merged commit 3319330 into slackapi:main May 15, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:signed python Pull requests that update Python code security semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Request verification can be skipped with ssl_check=1 when SSL check middleware is disabled

2 participants