mozmeao / infra

Mozilla Marketing Engineering and Operations Infrastructure
https://mozilla.github.io/meao/
Mozilla Public License 2.0
59 stars 12 forks source link

Mini-epic: Tune out DisallowedHost errors #1374

Closed stevejalim closed 2 years ago

stevejalim commented 2 years ago

Context

At the Django level, we already try to tune out the very common DisallowedHost exception that Django throws when it encounters spoofed hostnames that are not in ALLOWED_HOSTS. However, there's a certain class of vulnerability scan/attempt which fakes a hosthame that doesn't comply with the RFC, so seems to trigger DisallowedHost but in a way that isn't filtered out. Originally it was thought that this was a different code path in Django, but it's not, so maybe the Django-oriented logger filtering isn't working as expected any more.

This means that Sentry gets a reasonably high volume of errors that we could just be ignoring, and which will be eating into quotas, so it makes sense to find a way to tune these out, too

Success criteria