Skip to main content
interlace
Plugin: express-security

Rules

All ESLint security rules provided by eslint-plugin-express-security

10 Security Rules

Comprehensive coverage of Express.js security including CORS, CSRF, cookies, and rate limiting.

All Rules

Legend: Type-unaware Type-awareRecommendedFixableSuggestionsWarns
Rule🧠💼🔧💡⚠️Docs
no-client-controlled-authorization

This rule detects access decisions taken on request-supplied role, permission or identity values — the check runs, and passes for anyone who sets the field

🟢
no-cors-credentials-wildcard

The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:

🟢
no-disabled-helmet-protections

This rule detects helmet options that switch a shipped security-header default off, leaving a mounted helmet with the exposure of no helmet at all

🟢
no-error-details-in-response

Disallow sending caught error objects, stack traces, or spreads of them in HTTP responses.

🟢
no-exposed-debug-endpoints

Identifies potential debug, administration, or testing endpoints that are often left exposed in production environmen...

🟢
no-express-unsafe-regex-route

This rule detects Regular Expression Denial of Service (ReDoS) vulnerabilities in Express route patterns

🟢
no-graphql-introspection-production

This rule detects GraphQL servers with introspection enabled in production

🟢
no-host-header-in-links

Disallow building absolute URLs (password-reset and verification links) from the Host or X-Forwarded-Host request header.

🟢
no-idor-resource-access

This rule detects a resource fetched by an identifier taken straight from the request inside a handler that never mentions the authenticated principal — the classic IDOR shape

🟢
no-insecure-cookie-options

The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:

🟢
no-permissive-cors

Detects overly permissive CORS configurations in Express.js applications

🟢
no-permissive-trust-proxy

This rule detects unconditional 'trust proxy' settings, which make req.ip whatever the caller says it is and hand rate limits, IP allowlists and audit logs to the client

🟢
no-sensitive-data-in-query

Disallow reading sensitive-named parameters (password, token, secret, apiKey, ...) from req.query.

🟢
no-static-root-exposure

Disallow express.static() roots that expose the application directory and any serve-index usage

🟢
no-unsafe-csp-directives

This rule detects Content-Security-Policy directives that hand back the protection the header exists to provide — unsafe-inline, unsafe-eval, wildcard sources, unrestricted framing, and dropped mixed-content upgrades

🟢
no-user-controlled-render-locals

Disallow res.render() with locals or view names sourced wholesale from req.body / req.query / req.params

🟢
require-case-insensitive-path-guard

This rule detects path-based authorization guards that compare req.path case-sensitively, which case-insensitive Express routing bypasses

🟢
require-csrf-protection

The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:

🟢
require-express-body-parser-limits

The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance:

🟢
require-helmet

This rule detects Express.js applications that are missing the helmet middleware

🟢
require-query-type-guard

This rule detects string methods called on req.query values without a type guard — Express query values can be arrays or objects, not just strings

🟢
require-rate-limiting

This rule detects Express.js applications missing rate limiting middleware

🟢
require-route-authentication

This rule detects routes that expose a critical function — credentials, accounts, payments, configuration — with no authentication middleware and no principal read in the handler

🟢
require-strict-transport-security

This rule detects HSTS configurations that leave a downgrade window open — the header disabled, a max-age below the six-month floor, or subdomains excluded

🟢
Showing 24 of 24 rules

Rule Categories

CORS & Headers

Rules enforcing proper CORS configuration and security headers via Helmet.

Rules detecting insecure cookie options and improper session handling.

Rate Limiting & CSRF

Rules requiring rate limiting and CSRF protection middleware.

API Security

Rules preventing exposed debug endpoints and GraphQL introspection in production.

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.