Security fixes: upgrade Hubot + Slack adapter#100
Open
rhamenator wants to merge 2 commits intomainfrom
Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the Slackbot to use modern Hubot and Slack adapter dependencies, addressing security vulnerabilities and deprecations. The changes migrate from the deprecated hubot-slack to @hubot-friends/hubot-slack, upgrade Hubot core from v3 to v13, and refactor code to work with the new Socket Mode/Web API architecture.
- Replaces deprecated Slack RTM client with Web API client
- Implements internal heroku-keepalive to replace deprecated external script
- Modernizes test infrastructure with async/await support and proxyquire for dependency injection
Reviewed Changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates Hubot to v13, adds @hubot-friends/hubot-slack adapter, upgrades firebase and standard, removes deprecated external scripts |
| lib/initializers/mentioned-rooms-referencer.js | Refactors to use Slack Web API instead of RTM dataStore |
| lib/initializers/watch-for-disconnected.js | Adds adapter event listeners alongside legacy logger interception |
| lib/initializers/heroku-keepalive.js | New internal implementation replacing external hubot-heroku-keepalive script |
| lib/helpers/shorten-url.js | Adds error handling and HTTPS enforcement for TinyURL shortening |
| lib/templates/welcome-email.js | Adds helper functions to handle both string and object group structures |
| spec/lib/templates/welcome-email-spec.js | Replaces live API tests with mocked shorten-url dependency |
| spec/lib/initializers/*.js | Updates tests to use modern Hubot imports and async patterns |
| spec/helpers/include-hubot.js | Implements MockAdapter extending Hubot's Adapter class with async methods |
| bin/hubot | Adds -a @hubot-friends/hubot-slack adapter flag |
| README.md | Documents Socket Mode setup requirements and required scopes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
708142c to
0bff71f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing