Security-focused ESLint plugin with 89 AI-parseable rules for detecting and preventing vulnerabilities. OWASP Top 10 2021 + Mobile Top 10 2024 coverage, CWE references, and AI-assisted fix guidance.
npm install eslint-plugin-secure-coding
General secure coding practices and OWASP compliance for JavaScript/TypeScript.
This plugin provides General secure coding practices and OWASP compliance for JavaScript/TypeScript.
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
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.
- To check out the guide, visit eslint.interlace.tools. ๐
- ่ฆๆฅ็ไธญๆ ๆๅ, ่ฏท่ฎฟ้ฎ eslint.interlace.tools. ๐
- ๊ฐ์ด๋ ๋ฌธ์๋ eslint.interlace.tools์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
- ใฌใคใใฏ eslint.interlace.toolsใงใ็ขบ่ชใใ ใใใ ๐
- Para ver la guรญa, visita eslint.interlace.tools. ๐
- ููุงุทูุงุน ุนูู ุงูุฏูููุ ูู
ุจุฒูุงุฑุฉ eslint.interlace.tools. ๐
``bash`
npm install eslint-plugin-secure-coding --save-dev
| Preset | Description |
| :-------------------- | :-------------------------------------------------------------- |
| recommended | Balanced security for most projects (Web + key Mobile security) |strict
| | Maximum security enforcement (all rules as errors) |owasp-top-10
| | OWASP Top 10 Web 2021 compliance focused |owasp-mobile-top-10
| | OWASP Mobile Top 10 2024 compliance focused |
---
Legend
| Icon | Description |
| :--: | :----------------------------------------------------------------- |
| ๐ผ | 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. |
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
| :------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :---: | :--: | :---------------------------------------------------------------------- | :-: | :-: | :-: | :-: | :-: |
| detect-non-literal-regexp | CWE-400 | | 7.5 | ESLint security rule documentation for detect-non-literal-regexp | | โ ๏ธ | | | |
| detect-object-injection | CWE-915 | | 7.3 | ESLint security rule documentation for detect-object-injection | | โ ๏ธ | | | |
| detect-weak-password-validation | CWE-521 | | 7.5 | ESLint security rule documentation for detect-weak-password-validation | | | | | |
| no-directive-injection | CWE-94 | | 8.8 | ESLint security rule documentation for no-directive-injection | ๐ผ | | | | |
| no-electron-security-issues | CWE-693 | | 8.8 | ESLint security rule documentation for no-electron-security-issues | ๐ผ | | | | |
| no-format-string-injection | CWE-134 | | 9.8 | ESLint security rule documentation for no-format-string-injection | ๐ผ | | | | |
| no-graphql-injection | CWE-943 | | 8.6 | ESLint security rule documentation for no-graphql-injection | ๐ผ | | | | |
| no-hardcoded-credentials | CWE-798 | | 7.5 | ESLint security rule documentation for no-hardcoded-credentials | ๐ผ | | ๐ง | ๐ก | |
| no-hardcoded-session-tokens | CWE-798 | | 9.8 | ESLint security rule documentation for no-hardcoded-session-tokens | ๐ผ | | | | |
| no-improper-sanitization | CWE-116 | | 7.5 | ESLint security rule documentation for no-improper-sanitization | ๐ผ | | | | |
| no-improper-type-validation | CWE-20 | | 5.3 | ESLint security rule documentation for no-improper-type-validation | | โ ๏ธ | | | |
| no-insecure-comparison | CWE-697 | | 5.3 | ESLint security rule documentation for no-insecure-comparison | | โ ๏ธ | ๐ง | | ๐ซ |
| no-ldap-injection | CWE-90 | | 9.8 | ESLint security rule documentation for no-ldap-injection | ๐ผ | | | | |
| no-missing-authentication | CWE-306 | | 9.8 | ESLint security rule documentation for no-missing-authentication | | โ ๏ธ | | | |
| no-pii-in-logs | CWE-532 | | 7.5 | Enforce no pii in logs | | โ ๏ธ | | | |
| no-privilege-escalation | CWE-269 | | 8.8 | ESLint security rule documentation for no-privilege-escalation | | โ ๏ธ | | | |
| no-redos-vulnerable-regex | CWE-1333 | | 7.5 | ESLint security rule documentation for no-redos-vulnerable-regex | ๐ผ | | | ๐ก | |
| no-sensitive-data-exposure | CWE-532 | | 5.5 | ESLint security rule documentation for no-sensitive-data-exposure | | โ ๏ธ | | ๐ก | |
| no-unchecked-loop-condition | CWE-835 | | 7.5 | ESLint security rule documentation for no-unchecked-loop-condition | ๐ผ | | | | |
| no-unlimited-resource-allocation | CWE-770 | | 7.5 | ESLint security rule documentation for no-unlimited-resource-allocation | ๐ผ | | | | |
| no-unsafe-deserialization | CWE-502 | | 9.8 | ESLint security rule documentation for no-unsafe-deserialization | ๐ผ | | | | |
| no-unsafe-regex-construction | CWE-400 | | 7.5 | ESLint security rule documentation for no-unsafe-regex-construction | | โ ๏ธ | | ๐ก | |
| no-weak-password-recovery | CWE-640 | | 9.8 | ESLint security rule documentation for no-weak-password-recovery | ๐ผ | | | | |
| no-xpath-injection | CWE-643 | | 9.8 | ESLint security rule documentation for no-xpath-injection | ๐ผ | | | | |
| no-xxe-injection | CWE-611 | | 9.1 | ESLint security rule documentation for no-xxe-injection | ๐ผ | | | | |
| require-backend-authorization | | | | ESLint security rule documentation for require-backend-authorization | | | | | |
| require-secure-defaults | CWE-276 | | 7.5 | ESLint security rule documentation for require-secure-defaults | | | | | |
Part of the Interlace ESLint Ecosystem โ AI-native security plugins with LLM-optimized error messages:
| Plugin | Downloads | Description |
| :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------ |
| eslint-plugin-secure-coding |  | General security rules & OWASP guidelines. |
| eslint-plugin-pg |  | PostgreSQL security & best practices. |
| eslint-plugin-crypto |  | NodeJS Cryptography security rules. |
| eslint-plugin-jwt |  | JWT security & best practices. |
| eslint-plugin-browser-security |  | Browser-specific security & XSS prevention. |
| eslint-plugin-express-security |  | Express.js security hardening rules. |
| eslint-plugin-lambda-security |  | AWS Lambda security best practices. |
| eslint-plugin-nestjs-security |  | NestJS security rules & patterns. |
| eslint-plugin-mongodb-security |  | MongoDB security best practices. |
| eslint-plugin-vercel-ai-security |  | Vercel AI SDK security hardening. |
| eslint-plugin-import-next` |  | Next-gen import sorting & architecture. |
MIT ยฉ Ofri Peretz