NodejsSecurify is an advanced (White Box Testing Automation) npm package designed to enhance the security of Node.js applications. It provides a comprehensive set of security features and analysis capabilities to identify potential vulnerabilities and enforce best practices in accordance with OWASP guidelines.
NPM repo link: https://www.npmjs.com/package/node-js-securify
Detailed blog (highly recommended): https://pure-javascript-blogs.hashnode.dev/nodejssecurify-level-up-your-nodejs-app-security-with-this-npm-based-automation-package
With NodejsSecurify, developers can seamlessly integrate security checks into their Node.js projects. The package leverages a sophisticated code parsing mechanism, employing a powerful parser library like Acorn, Babel Parser, Esprima, or Recast, to analyze JavaScript code and identify security weaknesses.
NodejsSecurify employs a robust code parsing functionality, allowing developers to provide their Node.js code for analysis. The package parses the code and generates an Abstract Syntax Tree (AST) representation to examine the structure, statements, and expressions.
NodejsSecurify aligns with OWASP security standards, including the OWASP Cheat Sheet, which covers a wide range of security concerns, such as input validation, output encoding, authentication, session management, and more. It enforces these best practices by checking the provided code against the recommended guidelines.
The diverse set of security checks is achieved through a combination of techniques. Some vulnerabilities are identified through Naive Bayes classifier, while others are revealed by performing operations on the parsed code using Esprima or vanilla TypeScript. Additionally, simple if-else conditions play a crucial role in detecting certain vulnerabilities. This multi-faceted approach ensures a thorough and efficient analysis.
The package performs a series of security checks on the parsed code to identify potential vulnerabilities or insecure coding patterns. It focuses on detecting common security risks, such as: Input Validation, Dangerous Functions, DOS Attack, ReGex DOS Attack, Brute Force Attack, CallBack Hell, XSS Attack, Insecure Security Headers, Unsafe npm packages, Insecure Authentication, Code Injection.
NodejsSecurify generates detailed reports that highlight the identified security issues within the analyzed code. The reports provide developers with essential information, including the location of vulnerabilities, affected lines of code, and severity levels. This empowers developers to quickly identify and address security concerns.
The package aims to stay up to date with the evolving security landscape. NodejsSecurify is actively maintained and periodically updated to address new security threats, enhance performance, and incorporate changes in the OWASP guidelines.
npm i node-js-securify
to get latest package:
npm install node-js-securify@latest
then ..
const { Log } = require("node-js-securify");
Log.NodeJsSecurifyResults();
Run that .js file directly or indirectly depending on your code infrastructure
Keep an eye on your root directory to check for vulnerability analysis report pdf (NodeJsSecurifyReport.pdf) or log file (NodeJsSecurifyReport.log)
Check CONTRIBUTING.md for contributing in this project.