Skip to main content
interlace
Plugin: express-security

Overview

Express.js security hardening - cookies, CORS, CSRF, rate limiting, and Helmet

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.


Live README from GitHubfrom eslint-plugin-express-security/README.md, cached for 1 hour.Edit on GitHub
Interlace

  

Express

  

oxlint

  

ESLint

Comprehensive security rules for Express.js applications, mapping to OWASP Top 10.

NPM VersionNPM DownloadsPackage LicenseCodecovSince Dec 2025

⭐ If this plugin caught a real bug for you, star the repo — it's the signal that keeps these rules maintained.

Description

This plugin provides Comprehensive security rules for Express.js applications, mapping to OWASP Top 10.

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-express-security --save-dev

⚙️ Configuration Presets

PresetDescription
recommendedBalanced security for Express projects (critical as error, others warn)
strictMaximum security enforcement (all rules as errors)
apiHTTP/API security rules only (CORS, CSRF, cookies, rate limiting)
graphqlGraphQL-specific security rules only

📚 Supported Libraries

LibrarynpmDownloadsDetection
expressnpmdownloadsMisconfig, DoS
helmetnpmdownloadsMissing Security Headers
corsnpmdownloadsPermissive CORS
csurfnpmdownloadsMissing CSRF Protection

📦 Compatibility

PackageVersion
ESLint^8.0.0 || ^9.0.0 || ^10.0.0
Node.js>=18.0.0

See the ESLint Version Support Policy — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.

Rules

Legend

IconDescription
💼Recommended: Included in the recommended preset.
⚠️Warns: Set to warn in recommended preset.
🔧Auto-fixable: Automatically fixable by the --fix CLI option.
💡Suggestions: Providing code suggestions in IDE.
🚫Deprecated: This rule is deprecated.
🟢Type-unaware: AST-only, runs in oxlint JS-plugin tier.
🟡Type-aware (refining): pure-AST primary path; types refine precision.
🟠Type-aware (graceful): requires TS program; silent without it.
RuleCWEOWASPCVSSDescription🧠💼⚠️🔧💡🚫
no-client-controlled-authorizationCWE-863A01:2021This rule detects access decisions taken on request-supplied role, permission or identity values — the chec…🟢
no-cors-credentials-wildcardCWE-942The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:🟢
no-disabled-helmet-protectionsCWE-693A05:2021This rule detects helmet options that switch a shipped security-header default off, leaving a mounted helme…🟢💼
no-error-details-in-responseCWE-209A04:2021Disallow sending caught error objects, stack traces, or spreads of them in HTTP responses.🟢
no-exposed-debug-endpointsCWE-489A05:2021Identifies potential debug, administration, or testing endpoints that are often left exposed in production…🟢
no-express-unsafe-regex-routeCWE-1333This rule detects Regular Expression Denial of Service (ReDoS) vulnerabilities in Express route patterns🟢
no-graphql-introspection-productionCWE-200This rule detects GraphQL servers with introspection enabled in production🟢
no-host-header-in-linksCWE-640A07:2021Disallow building absolute URLs (password-reset and verification links) from the Host or X-Forwarded-Host r…🟢
no-idor-resource-accessCWE-639A01:2021This rule detects a resource fetched by an identifier taken straight from the request inside a handler that…🟢
no-insecure-cookie-optionsCWE-614The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:🟢💼
no-permissive-corsCWE-942Detects overly permissive CORS configurations in Express.js applications🟢💼
no-permissive-trust-proxyCWE-348A05:2021This rule detects unconditional 'trust proxy' settings, which make req.ip whatever the caller says it is an…🟢💼
no-sensitive-data-in-queryCWE-598A04:2021Disallow reading sensitive-named parameters (password, token, secret, apiKey, ...) from req.query.🟢
no-static-root-exposureCWE-548A05:2021Disallow express.static() roots that expose the application directory and any serve-index usage🟢
no-unsafe-csp-directivesCWE-79A03:2021This rule detects Content-Security-Policy directives that hand back the protection the header exists to pro…🟢💼
no-user-controlled-render-localsCWE-73A03:2021Disallow res.render() with locals or view names sourced wholesale from req.body / req.query / req.params🟢
require-case-insensitive-path-guardCWE-178A01:2021This rule detects path-based authorization guards that compare req.path case-sensitively, which case-insens…🟢
require-csrf-protectionCWE-352The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:🟢💼
require-express-body-parser-limitsCWE-400The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:🟢
require-helmetCWE-693This rule detects Express.js applications that are missing the helmet middleware🟢💼
require-query-type-guardCWE-843A03:2021This rule detects string methods called on req.query values without a type guard — Express query values can…🟢
require-rate-limitingCWE-770This rule detects Express.js applications missing rate limiting middleware🟢💼
require-route-authenticationCWE-306A07:2021This rule detects routes that expose a critical function — credentials, accounts, payments, configuration —…🟢
require-strict-transport-securityCWE-319A02:2021This rule detects HSTS configurations that leave a downgrade window open — the header disabled, a max-age b…🟢💼

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

PluginDownloadsDescription
eslint-plugin-secure-codingdownloadsGeneral security rules & OWASP guidelines.
eslint-plugin-pgdownloadsPostgreSQL security & best practices.
eslint-plugin-node-securitydownloadsNode.js core-module security (fs, child_process, vm, crypto, Buffer).
eslint-plugin-jwtdownloadsJWT security & best practices.
eslint-plugin-browser-securitydownloadsBrowser-specific security & XSS prevention.
eslint-plugin-express-securitydownloadsExpress.js security hardening rules.
eslint-plugin-lambda-securitydownloadsAWS Lambda security best practices.
eslint-plugin-nestjs-securitydownloadsNestJS security rules & patterns.
eslint-plugin-mongodb-securitydownloadsMongoDB security best practices.
eslint-plugin-vercel-ai-securitydownloadsVercel AI SDK security hardening.
eslint-plugin-import-nextdownloadsNext-gen import sorting & architecture.

⭐ Support & follow

If this plugin caught a real bug for you, star the repo — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and follow the writeups on Dev.to for the benchmarks and security research behind these rules.

GitHub stars

📄 License

MIT © Ofri Peretz

ESLint Interlace Plugin

Interlace

View README.md on GitHub →

Building secure JavaScript with Interlace? Star the repo to get new rules and CWE coverage as we ship them — or follow the AI-code-security benchmarks behind them.

On this page

No Headings