Skip to content

feat(functions/slack): replace deprecated @slack/events-api with manual Slack signature verification #4082

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
62de3df
chore(deps): remove deprecated @slack/events-api package
hivanalejandro Apr 29, 2025
74c8f3e
feat(security): add manual Slack request signature verification
hivanalejandro Apr 29, 2025
e2d1b2b
docs(security): add detailed comments to Slack request verification f…
hivanalejandro Apr 29, 2025
fbf48db
test(webhook): remove deprecated events-api mocks and update signatur…
hivanalejandro Apr 29, 2025
b7dd18d
test(webhook): fix HMAC verification setup and remove env destructuri…
hivanalejandro Apr 29, 2025
7a1689c
test(webhook): add Slack signature and timestamp headers in unit test…
hivanalejandro Apr 29, 2025
4a417ad
fix(webhook): avoid timingSafeEqual range error by checking buffer le…
hivanalejandro Apr 30, 2025
fc5e181
test(webhook): fix signature mocks and assert error details explicitl…
hivanalejandro Apr 30, 2025
316233a
fix(webhook): align error messages and status codes in tests and vali…
hivanalejandro Apr 30, 2025
22aaf29
test(unit): mock verifyWebhook and fix expected error codes
hivanalejandro Apr 30, 2025
6d85540
test(unit): globally mock verifyWebhook to bypass signature validatio…
hivanalejandro Apr 30, 2025
c91fc2c
test(unit): properly mock verifyWebhook using proxysquire to bypass s…
hivanalejandro Apr 30, 2025
92b3322
fix(tests): correct typo in proxyquire usage to fix ReferenceError in…
hivanalejandro Apr 30, 2025
d941c86
fix(test): mock verifyWebhook to bypass signature validation in unit …
hivanalejandro Apr 30, 2025
fb8bc95
fix(tests): mock crypto module in unit tests to bypass Slack signatur…
hivanalejandro Apr 30, 2025
7069532
fix(test): mock verifyWebhook for Slack tests without altering docume…
hivanalejandro May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions functions/slack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
},
"dependencies": {
"@google-cloud/functions-framework": "^3.1.0",
"@googleapis/kgsearch": "^1.0.0",
"@slack/events-api": "^3.0.0"
"@googleapis/kgsearch": "^1.0.0"
},
"devDependencies": {
"c8": "^10.0.0",
Expand Down
Loading