no longer supported
This is a tool for identifying and reporting on regular expressions where
there is a risk of ReDoS (the regular expression denial of service) attack.
for example: "/^(a|a)$/", "/^(\w|\d)+$/", "/^(.)="(.*)"$/"
In your project, run
npm install eslint@4.0.0
npm install git+https://github.com/Neccolini/seccampZ3-linter.git
Then, add ↓ to .eslintrc.js
module.exports = {
"plugins": [
"seccamp-z3"
],
"rules": {
"seccamp-z3/no-literal":"error"
}
};
To detect ReDoS, run
node_module/.bin/eslint <filename | directory>
This repository includes:
- TypeScript setting
- Jest
- CircleCI configuration