Rules
All ESLint security rules provided by eslint-plugin-secure-coding
78+ Security Rules
Comprehensive coverage of OWASP Top 10 vulnerabilities and secure coding best practices.
All Rules
| Rule | 🧠 | 💼 | 🔧 | 💡 | ⚠️ | Docs |
|---|---|---|---|---|---|---|
| secure-coding/no-hardcoded-credentials (ours) | 🟢 | |||||
| eslint-plugin-no-secrets/no-secrets | 🟢 | |||||
| detect-non-literal-regexp Detects RegExp(variable), which might allow an attacker to DOS your server with a long-running regular expression | 🟢 | |||||
| detect-object-injection Detects variable[key] written as an assignment target, or read and then invoked | 🟡 | |||||
| detect-weak-password-validation Identify weak password requirements | 🟢 | |||||
| no-bidi-characters Disallows Unicode bidirectional control characters, which let source render differently than it compiles (Trojan Source, CWE-1007) | 🟢 | |||||
| no-directive-injection Detects directive injection vulnerabilities in templates | 🟢 | |||||
| no-disabled-template-escaping Disallows assigning `false` to `escapeMarkup`, which disables template HTML auto-escaping (CWE-79) | 🟢 | |||||
| no-electron-security-issues Detects Electron security vulnerabilities and insecure configurations | 🟢 | |||||
| no-fail-open-auth Detects authentication and authorization checks whose catch block fails open | 🟢 | |||||
| no-format-string-injection Detects format string injection vulnerabilities | 🟢 | |||||
| no-graphql-injection Detects GraphQL injection vulnerabilities and DoS attacks | 🟢 | |||||
| no-hardcoded-credentials Detects hardcoded passwords, API keys, tokens, and other sensitive credentials | 🟢 | |||||
| no-hardcoded-session-tokens Detect hardcoded session/JWT tokens | 🟢 | |||||
| no-homoglyph-identifiers Detects homoglyph identifiers and invisible characters that hide what the code actually does | 🟢 | |||||
| no-improper-sanitization Detects improper sanitization of user input | 🟢 | |||||
| no-improper-type-validation Detects improper type validation in user input handling | 🟢 | |||||
| no-insecure-comparison Detects insecure comparison operators (==, !=) that can lead to type coercion vulnerabilities | 🟢 | |||||
| no-invisible-characters Disallows invisible letters such as the Hangul fillers (U+3164, U+FFA0), which hide identifiers, values and comment text from code review (CWE-1007) | 🟢 | |||||
| no-ldap-injection Detects LDAP injection vulnerabilities | 🟢 | |||||
| no-log-injection Detects request data concatenated into a log message, which lets an attacker forge log records | 🟢 | |||||
| no-missing-authentication Detects missing authentication checks in route handlers | 🟢 | |||||
| no-pii-in-logs Prevent PII (email, SSN, credit cards) in console logs | 🟢 | |||||
| no-privilege-escalation Detects potential privilege escalation vulnerabilities | 🟢 | |||||
| no-redos-vulnerable-regex Detects ReDoS-vulnerable regex patterns in literal regex patterns | 🟢 | |||||
| no-sensitive-data-exposure Detects PII/credentials in logs, responses, or error messages | 🟢 | |||||
| no-sql-injection Prevent SQL injection when a query is built from attacker-controlled input and executed through a driver-agnostic handle | 🟢 | |||||
| no-template-injection Disallow dynamic strings as template arguments to server-side template engines (CWE-94) | 🟢 | |||||
| no-unchecked-loop-condition Detects unchecked loop conditions that could cause DoS | 🟢 | |||||
| no-unlimited-resource-allocation Detects unlimited resource allocation that could cause DoS | 🟢 | |||||
| no-unsafe-deserialization Detects unsafe deserialization of untrusted data | 🟢 | |||||
| no-unsafe-regex-construction Detects unsafe regex construction patterns (user input without escaping, dynamic flags) | 🟢 | |||||
| no-weak-password-recovery Detects weak password recovery mechanisms | 🟢 | |||||
| no-xpath-injection Detects XPath injection vulnerabilities | 🟢 | |||||
| no-xxe-injection Detect XML External Entity (XXE) injection vulnerabilities | 🟢 | |||||
| require-backend-authorization Require server-side authorization checks | 🟢 | |||||
| require-secure-defaults Ensure secure default configurations | 🟢 |
Rule Categories
Injection Prevention
Rules that prevent SQL injection, XSS, command injection, and other injection attacks.
Authentication & Authorization
Rules for secure authentication patterns, session management, and access control.
Cryptography
Rules ensuring proper use of cryptographic functions and secure random number generation.
Data Protection
Rules preventing exposure of sensitive data in logs, storage, and transmission.
Input Validation
Rules enforcing proper input validation and sanitization.
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.