-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Detect Slack workflows webhook #2569
Detect Slack workflows webhook #2569
Conversation
841c20f
to
cd1d9c9
Compare
keyPat = regexp.MustCompile(`(https://hooks\.slack\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]{23,25})`) | ||
keyPats = map[string]*regexp.Regexp{ | ||
"Slack Service Web Hook": regexp.MustCompile(`(https://hooks\.slack\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]{23,25})`), | ||
"Slack Workflow Web Hook ": regexp.MustCompile(`(https://hooks\.slack\.com/workflows/T[A-Z0-9]+/A[A-Z0-9]+/[0-9]{17,19}/[A-Za-z0-9]{23,25})`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I'm not intimately familiar with slack webhooks, but when I go into our slack to create a workflow the "Web request URL" I am getting looks like https://hooks.slack.com/triggers/TEL4..../69.../..
. Is this because Slack updated the format of the URL or i'm just setting it up in the wrong place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you're right, this format seems to be a legacy one already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for confirming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @juliendoutre for the update here, we really appreciate it! Sorry for the delayed review.
Description:
This PR implements the solution proposed in #2571 to detect another type of Slack Webhook URLs.
Checklist:
make test-community
)?make lint
this requires golangci-lint)?