njsscan is a Static Application Security Testing (SAST) tool designed to identify insecure code patterns within Node.js applications. It leverages the `semgrep` engine for its scanning capabilities. The library is actively maintained, currently at version 0.4.3, with frequent minor updates focusing on rule improvements, performance, and bug fixes.
pip install njsscanVerified import paths — ran on the pinned version, not inferred.
njsscan is primarily used as a command-line tool. This example demonstrates how to scan a Node.js project located at `./my_nodejs_project` and output the results to a JSON file.
Ensure `semgrep` is installed (e.g., `pip install semgrep` or via official `semgrep` installation methods) and its executable is accessible in your system's PATH.
Upgrade to Python 3.7 or newer. The library is tested against recent Python versions.
Upgrade to the latest version of njsscan (0.3.6 or newer) to benefit from performance improvements and updated underlying dependencies like `libsast` and `semgrep`.
Upgrade to njsscan version 0.3.2 or newer to ensure full compatibility and optimized performance on M1 Mac ARM systems.