Make default max_warnings finite and reasonably low
Vasfed opened this issue · comments
Vasily Fedoseyev commented
When not explicitly set via PRONTO_MAX_WARNINGS
or in config, max_warnings
is infinite.
This is potentially dangerous, because couple thousands comments can lead to DOS on on-premise gitlab (it's sidekiq becomes flooded with NewNoteWorker
/Integrations::ExecuteWorker
, also lots of emails are sent and there's a risk of becoming banned by email server for spam), api rate limit hits on other providers etc.
Setting default max_warnings
to some reasonable value (150..300..500?) with an ability to explicitly opt-in to infinity seems like a more safe solution.