eslint-plugin-fasec
v1.0.0
Published
Fusion Alliance Security Scanner - ESLint Rules
Downloads
12
Readme
Fusion Alliance Security for Node.js - ESLint Plugins
The plugin architecture of ESLint makes it possible to create plugins that look for potential security issues in JavaScript code. Adam Baldwin discusses some of these techniques in his article Using ESLint Plugins for Node.js App Security. This project is a collection of security-minded ESLint custom rules.
Getting Started
You can use these rules in ESLint manually:
eslint --reset -c config.json --rulesdir ./lib [file.js] [dir]
But in practice it's much more convenient to use them in a task runner plugin, such as the FASEC Grunt plugin.
Demo
To see FASEC in action, clone and run the FASEC demo project.
Test
Testing is provided by mocha.
Either run in bash:
$ npm test
Or the full command:
$ node_modules/mocha/bin/_mocha tests/**/*.js --reporter spec
List of supported rules
- no-csrf-before-method-override: Checks to see if CSRF middleware is before methodOverride http://blog.nodesecurity.io/2013/09/07/bypass-connect-csrf-protection-by-abusing
- no-timing-attacks: Looks for potential hot spot string comparisons
- no-unsafe-regex: Check if using unsafe regex via safe-regex
Contributors
FASEC is a product of Fusion Alliance © 2015.
- Ray Clannan (Author)
This project uses the following Open Source components:
- evilpacket/eslint-rules, Copyright (c) 2013 Adam Baldwin, MIT License.
LICENSE
The MIT License (MIT)
Copyright (c) 2015 Fusion Alliance With portions Copyright (c) 2013 Adam Baldwin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.