davisjam / vuln-regex-detector

Detect vulnerable regexes in your project. REDOS, catastrophic backtracking.
MIT License
316 stars 27 forks source link

Handle .jsx files as JavaScript #61

Open jamesdonoh opened 5 years ago

jamesdonoh commented 5 years ago

At my work we have a lot of React code and therefore a lot of JSX which can be a vessel for SL regexes too.

This change causes the extraction process to treat .jsx files as JavaScript, on the assumption that extracting static regexes should work the same for JSX, and the JSX sugar itself is just ignored.