3 ms·
It's great to see more introductory ReDoS material! I took a deep-dive on ReDoS myself recently and found the material available to be somewhat lacking, especia
by schwag09 6y ago
It's great to see more introductory ReDoS material! I took a deep-dive on ReDoS myself recently and found the material available to be somewhat lacking, especially for beginners. Over the course of my investigation I found some interesting bugs in big name projects and created a few blog posts as an introduction to the bug class:
* https://blog.r2c.dev/2020/finding-python-redos-bugs-at-scale-using-dlint-and-r2c/ https://blog.r2c.dev/2020/finding-python-redos-bugs-at-scale...
* https://blog.r2c.dev/2020/improving-redos-detection-with-dlint-and-r2c/ https://blog.r2c.dev/2020/improving-redos-detection-with-dli...
The culmination of this work was a Python regex linter that could automatically detect ReDoS expressions with fairly high accuracy - Dlint's DUO138 rule: https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO138.md https://github.com/dlint-py/dlint/blob/master/docs/linters/D....
In my opinion, the best solution, as this article mentions, is to avoid the bug class altogether by using something like RE2 when possible. Nevertheless, I found ReDoS to be a really cool bug class at the intersection of computer science and software engineering.