Open msymons opened 3 years ago
Testing in v4.4.1 shows that the rate throttling happens more often now... but only when GHSA integration is enabled: it means that far more individual vulnerabilities are creating two separate alerts.
Issue is still occurring in v4.9.0 SNAPSHOT. Log entry has changed:
2023-09-06 19:57:19,420 ERROR [SlackPublisher] An error was encountered publishing notification to Slackwith HTTP Status : 429 Too Many Requests Destination: https://hooks.slack.com/services/xxxx/yyyy/zzzz Response: {"retry_after":1,"ok":false,"error":"rate_limited"}
Note that the "retry_after" is 1 second. This seems to be more strictly limited than when this issue was logged in 2021.
Current Behavior:
After setting up Slack notifications on DT 4.3.1 I have seen 269 occurrences of HTTP 429 ERROR in the space of 24 hours. I cannot say that the errors did not occur in earlier versions of DT, but my logs go back only 3 months... to two days after I disabled notifications because DT 3.8.0 had problems with CycloneDX 1.2 BOMs.
In #322 (logged long ago against DT 3.4.0), it was stated:
There is nothing logged to state that the notifications have been retried and thus it would appear that they have poofed, never to be delivered. This is problematic because, without notifications, it can be hard to know what new vulnerabilities have been detected most recently in the portfolio. This is something that I was attempting to deal with via a different route when suggesting enhancement #1137.
Steps to Reproduce:
Too Many Requests
events in the space of 2 seconds. (DT reported 100 vulnerabilities).Expected Behavior:
Basic expectation is that the number of slack notifications received should match the number that should have been received
I know that this did not happen because Slack reported...
Environment:
Additional Details:
The link in the screenshot above is to Slack documentation on Rate Limits.
This makes me wonder if maybe the way to approach things is perhaps to think about switching to use Slack Web API as suggested in #776