ESLint InterlaceESLint Interlace
Plugin: node-security

Overview

Node.js security rules for fs, child_process, vm, and crypto modules

Live from GitHub

This content is fetched directly from README.md on GitHub and cached for 1 hour.

AI-Optimized Security

Every rule includes CWE, OWASP, and CVSS metadata for AI assistants to provide precise, context-aware fixes.


ESLint Interlace Logo

Security-focused ESLint plugin for Node.js built-in modules (fs, child_process, vm, crypto, Buffer).

NPM VersionNPM DownloadsPackage LicenseCodecovSince Dec 2025

Description

This plugin provides Security rules for Node.js core modules (fs, child_process, crypto, etc). By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.

Philosophy

Interlace fosters strength through integration. Instead of stacking isolated rules, we interlace security directly into your workflow to create a resilient fabric of code. We believe tools should guide rather than gatekeep, providing educational feedback that strengthens the developer with every interaction.

Getting Started

npm install eslint-plugin-node-security --save-dev

๐Ÿ’ก What You Get

  • 31 security rules covering Node.js core module vulnerabilities
  • Command Injection Detection for child_process.exec, spawn, and execFile
  • Path Traversal Prevention for fs module operations
  • TOCTOU Race Condition Detection for file system operations
  • Cryptographic Security for weak algorithms and key management
  • LLM-optimized messages with CWE references and fix guidance

โš™๏ธ Configuration Presets

PresetDescription
recommendedBalanced security for most Node.js projects
strictMaximum security enforcement (all rules as errors)
fs-securityFocus on file system vulnerabilities (CWE-22, CWE-73)
cryptoCryptographic security rules only

Rules

Legend

IconDescription
๐Ÿ’ผRecommended: Included in the recommended preset.
โš ๏ธWarns: Set towarn in recommended preset.
๐Ÿ”งAuto-fixable: Automatically fixable by the --fix CLI option.
๐Ÿ’กSuggestions: Providing code suggestions in IDE.
๐ŸšซDeprecated: This rule is deprecated.
RuleCWEOWASPCVSSDescription๐Ÿ’ผโš ๏ธ๐Ÿ”ง๐Ÿ’ก๐Ÿšซ
detect-child-processCWE-789.8ESLint rule documentation for detect-child-process๐Ÿ’ผ๐Ÿ’ก
detect-eval-with-expressionCWE-959.8ESLint rule documentation for detect-eval-with-expression๐Ÿ’ผ
detect-non-literal-fs-filenameCWE-227.5ESLint rule documentation for detect-non-literal-fs-filename๐Ÿ’ผ๐Ÿ’ก
detect-suspicious-dependenciesCWE-8298.2ESLint rule documentation for detect-suspicious-dependencies๐Ÿ’ผ
lock-fileCWE-8297.5ESLint rule documentation for lock-file๐Ÿ’ผ
no-arbitrary-file-accessCWE-227.5ESLint rule documentation for no-arbitrary-file-access๐Ÿ’ผ
no-buffer-overreadCWE-1267.5ESLint rule documentation for no-buffer-overread๐Ÿ’ผ
no-cryptojsCWE-3275.0ESLint rule documentation for no-cryptojs๐Ÿ’ผโš ๏ธ๐Ÿ’ก
no-cryptojs-weak-randomCWE-3385.3ESLint rule documentation for no-cryptojs-weak-random๐Ÿ’ผ๐Ÿ’ก
no-data-in-temp-storageCWE-3127.5ESLint rule documentation for no-data-in-temp-storageโš ๏ธ
no-deprecated-cipher-methodCWE-3275.0ESLint rule documentation for no-deprecated-cipher-method๐Ÿ’ผ๐Ÿ’ก
no-dynamic-dependency-loadingCWE-8297.5ESLint rule documentation for no-dynamic-dependency-loadingโš ๏ธ
no-dynamic-requireCWE-7067.5ESLint rule documentation for no-dynamic-requireโš ๏ธ
no-ecb-modeCWE-3277.5ESLint rule documentation for no-ecb-mode๐Ÿ’ผ๐Ÿ’ก
no-insecure-key-derivationCWE-9167.5ESLint rule documentation for no-insecure-key-derivation๐Ÿ’ผ๐Ÿ’ก
no-insecure-rsa-paddingCWE-3277.4ESLint rule documentation for no-insecure-rsa-padding๐Ÿ’ผ๐Ÿ’ก
no-pii-in-logsCWE-5327.5ESLint rule documentation for no-pii-in-logsโš ๏ธ
no-self-signed-certsCWE-2957.5ESLint rule documentation for no-self-signed-certs๐Ÿ’ผ๐Ÿ’ก
no-sha1-hashCWE-3277.5ESLint rule documentation for no-sha1-hash๐Ÿ’ผ๐Ÿ’ก
no-static-ivCWE-3297.5ESLint rule documentation for no-static-iv๐Ÿ’ผ๐Ÿ’ก
no-timing-unsafe-compareCWE-2085.9ESLint rule documentation for no-timing-unsafe-compare๐Ÿ’ผโš ๏ธ๐Ÿ’ก
no-toctou-vulnerabilityCWE-3677.0ESLint rule documentation for no-toctou-vulnerability๐Ÿ’ผ๐Ÿ’ก
no-unsafe-dynamic-requireCWE-7067.5ESLint rule documentation for no-unsafe-dynamic-require๐Ÿ’ผ๐Ÿ’ก
no-weak-cipher-algorithmCWE-3277.5ESLint rule documentation for no-weak-cipher-algorithm๐Ÿ’ผ๐Ÿ’ก
no-weak-hash-algorithmCWE-3277.5ESLint rule documentation for no-weak-hash-algorithm๐Ÿ’ผ๐Ÿ’ก
no-zip-slipCWE-228.1ESLint rule documentation for no-zip-slip๐Ÿ’ผ
prefer-native-cryptoCWE-3275.0ESLint rule documentation for prefer-native-crypto๐Ÿ’ผโš ๏ธ๐Ÿ’ก
require-dependency-integrityCWE-4947.5ESLint rule documentation for require-dependency-integrity
require-secure-credential-storageCWE-5227.5ESLint rule documentation for require-secure-credential-storage
require-secure-deletionCWE-4597.5ESLint rule documentation for require-secure-deletion
require-storage-encryptionCWE-3117.5ESLint rule documentation for require-storage-encryption

Part of the Interlace ESLint Ecosystem โ€” AI-native security plugins with LLM-optimized error messages:

PluginDownloadsDescription
eslint-plugin-secure-codingGeneral security rules & OWASP guidelines.
eslint-plugin-pgPostgreSQL security & best practices.
eslint-plugin-cryptoNodeJS Cryptography security rules.
eslint-plugin-jwtJWT security & best practices.
eslint-plugin-browser-securityBrowser-specific security & XSS prevention.
eslint-plugin-express-securityExpress.js security hardening rules.
eslint-plugin-lambda-securityAWS Lambda security best practices.
eslint-plugin-nestjs-securityNestJS security rules & patterns.
eslint-plugin-mongodb-securityMongoDB security best practices.
eslint-plugin-vercel-ai-securityVercel AI SDK security hardening.
eslint-plugin-import-nextNext-gen import sorting & architecture.

๐Ÿ“„ License

MIT ยฉ Ofri Peretz

ESLint Interlace Plugin

View README.md on GitHub โ†’

On this page

No Headings