Suggest using ranges as protection against ReDos
What does this MR do and why?
Adds a suggestion in the Secure Coding Guidelines, under the Denial of Service (ReDoS) / Catastrophic Backtracking section, to specify reasonable ranges in regular expression patterns instead of the unbounded *
and +
which provides good resilience against ReDoS vulnerabilities, which is an issue we often see in our code.
/cc @gitlab-com/gl-security/appsec for feedback.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Russell Dickenson