Skip to content
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

Add "retries" config to teams output module #2206

Merged

Conversation

domwhewell-sage
Copy link
Contributor

This PR adds a "retries" config option to the teams output module as repeated failures would cause the module to hold up the scan from finishing #2203
Also tweaked the code incase of a 429 response to obtain the Retry-After from the headers as the power automate webhook sends a empty body

@TheTechromancer
Copy link
Collaborator

TheTechromancer commented Jan 24, 2025

Thanks for doing this; it's definitely needed. Since we have a helper with builtin retries, I enhanced it to respect the retry-after header, and made a PR to your PR:

domwhewell-sage#5

Let me know what you think. The biggest change is that instead of skipping the event, it will disable the module. but only after 100 failed requests (10 requests * 10 total failures). We can tweak the constants if needed. This will help keep the module from getting stuck if there are thousands of events in the queue.

@TheTechromancer TheTechromancer merged commit 049c11d into blacklanternsecurity:dev Jan 24, 2025
14 of 15 checks passed
@domwhewell-sage domwhewell-sage deleted the teams_output_module branch January 24, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants