Node.js Security
v1.0.0
Reviews Node.js code for security vulnerabilities — input sanitization, eval/exec prevention, HTTP header hardening, dependency risks, and prototype pollution. Server-side JavaScript runs with full system access, so a single unsanitized input can compromise the entire host.
Security(14)
Store secrets in env or a secret manager, never in code
Keep API keys, tokens, and credentials out of source; load them from environment variables or a managed secret store.
Avoid eval() and Dynamic Code Execution
Never use eval(), new Function(), or vm.runInScript() with user-provided input. These functions execute arbitrary code with the full privileges of your Node.js process — an attacker can read files, access databases, or take over the entire server.
Automate Node.js Security checks on every PR
BeforeMerge scans your pull requests against all 14 Node.js Security rules automatically. Get actionable feedback before code ships.