This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i -g eslint | |
npm i -g eslint-plugin-security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parserOptions": { | |
"ecmaVersion": 2017 | |
}, | |
"env": { | |
"es6": true, | |
"browser": true, | |
"node": true | |
}, | |
"plugins": [ | |
"security" | |
], | |
"extends": [ | |
"plugin:security/recommended" | |
], | |
"rules": { | |
"security/detect-child-process": "off" | |
} | |
} |
eslint --no-eslintrc -c /path/to/eslint-sec.json /path/to/project/source/code/dir/Here is a quick intro to nsp:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g nsp | |
$ cd /path/to/project | |
$ nsp check | |
# To exclude errors create a file with exceptions (not recommended): | |
$ cat .nsprc | |
{ | |
"exceptions": [ | |
"https://nodesecurity.io/advisories/532", | |
"https://nodesecurity.io/advisories/536" | |
] | |
} |
No comments:
Post a Comment