-
Notifications
You must be signed in to change notification settings - Fork 274
Update Microsoft Teams webhook #816
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
Conversation
canarytokens/webhook_formatting.py
Outdated
| MsTeamsAction( | ||
| type="Action.OpenUrl", | ||
| title="Canarytokens.org", | ||
| url="https://canarytokens.org/nest/", |
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.
might be best to make this URL a constant and then refer to it?
canarytokens/webhook_formatting.py
Outdated
| MsTeamsAction( | ||
| type="Action.OpenUrl", | ||
| title="Canarytokens.org", | ||
| url="https://canarytokens.org/nest/", |
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.
same here
canarytokens/webhook_formatting.py
Outdated
| MsTeamsAction( | ||
| type="Action.OpenUrl", | ||
| title="Canarytokens.org", | ||
| url="https://canarytokens.org/nest/", |
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.
same
Proposed changes
Microsoft deprecated the URL format that was previously being used and have recently begun requiring that a particular URL format be used for Teams webhooks:
https://default_some_hash_.ac.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/...If a webhook notification is enabled for a Canarytoken that matches this new format, an alert will be posted to the Teams channel that the URL has been configured for.
The payload format has also been updated to the newer and recommended AdaptiveCard format.
Types of changes
What types of changes does your code introduce to this repository?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.pre-commitin the repo)Further comments
The changes were tested by creating a Web Bug token and then triggering it, and manually creating a exposed key alert for a AWS API Key token. Each message was then checked on Teams to ensure it was being displayed correctly.
This is what the messages looked like before the change: