eslint-plugin-browser-security 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/AGENTS.md +97 -0
  2. package/CHANGELOG.md +148 -0
  3. package/README.md +111 -89
  4. package/package.json +21 -5
  5. package/src/index.js +14 -1
  6. package/src/oxlint.d.ts +20 -0
  7. package/src/oxlint.js +21 -0
  8. package/src/rules/detect-mixed-content/index.js +3 -0
  9. package/src/rules/no-allow-arbitrary-loads/index.js +3 -0
  10. package/src/rules/no-clickjacking/index.js +10 -5
  11. package/src/rules/no-client-side-auth-logic/index.js +4 -0
  12. package/src/rules/no-cookie-auth-tokens/index.js +4 -1
  13. package/src/rules/no-credentials-in-query-params/index.js +3 -0
  14. package/src/rules/no-disabled-certificate-validation/index.js +5 -2
  15. package/src/rules/no-dynamic-service-worker-url/index.js +4 -1
  16. package/src/rules/no-eval/index.js +34 -15
  17. package/src/rules/no-filereader-innerhtml/index.js +8 -5
  18. package/src/rules/no-http-urls/index.js +3 -0
  19. package/src/rules/no-innerhtml/index.js +58 -34
  20. package/src/rules/no-insecure-redirects/index.js +5 -2
  21. package/src/rules/no-insecure-websocket/index.js +3 -0
  22. package/src/rules/no-jwt-in-storage/index.js +7 -4
  23. package/src/rules/no-missing-cors-check/index.js +5 -2
  24. package/src/rules/no-missing-csrf-protection/index.js +3 -0
  25. package/src/rules/no-missing-security-headers/index.js +20 -17
  26. package/src/rules/no-password-in-url/index.js +3 -0
  27. package/src/rules/no-permissive-cors/index.js +4 -0
  28. package/src/rules/no-postmessage-innerhtml/index.js +8 -5
  29. package/src/rules/no-postmessage-wildcard-origin/index.js +4 -1
  30. package/src/rules/no-sensitive-cookie-js/index.js +4 -1
  31. package/src/rules/no-sensitive-data-in-analytics/index.js +3 -0
  32. package/src/rules/no-sensitive-data-in-cache/index.js +5 -1
  33. package/src/rules/no-sensitive-indexeddb/index.js +4 -1
  34. package/src/rules/no-sensitive-localstorage/index.js +3 -0
  35. package/src/rules/no-sensitive-sessionstorage/index.js +4 -1
  36. package/src/rules/no-tracking-without-consent/index.js +3 -0
  37. package/src/rules/no-unencrypted-transmission/index.js +5 -2
  38. package/src/rules/no-unescaped-url-parameter/index.js +6 -2
  39. package/src/rules/no-unsafe-eval-csp/index.js +4 -1
  40. package/src/rules/no-unsafe-inline-csp/index.js +4 -1
  41. package/src/rules/no-unvalidated-deeplinks/index.js +3 -0
  42. package/src/rules/no-websocket-eval/index.js +6 -3
  43. package/src/rules/no-websocket-innerhtml/index.js +8 -5
  44. package/src/rules/no-worker-message-innerhtml/index.js +8 -5
  45. package/src/rules/require-blob-url-revocation/index.js +4 -1
  46. package/src/rules/require-cookie-secure-attrs/index.js +4 -1
  47. package/src/rules/require-csp-headers/index.js +3 -0
  48. package/src/rules/require-https-only/index.js +3 -0
  49. package/src/rules/require-mime-type-validation/index.js +3 -0
  50. package/src/rules/require-postmessage-origin-check/index.js +3 -0
  51. package/src/rules/require-url-validation/index.js +3 -0
  52. package/src/rules/require-websocket-wss/index.js +6 -2
package/AGENTS.md ADDED
@@ -0,0 +1,97 @@
1
+ # AGENTS.md
2
+
3
+ > Context for AI coding agents working on eslint-plugin-browser-security
4
+
5
+ ## Setup Commands
6
+
7
+ ```bash
8
+ # Install dependencies (from monorepo root)
9
+ npm install
10
+
11
+ # Build this package
12
+ nx build eslint-plugin-browser-security
13
+
14
+ # Run tests
15
+ nx test eslint-plugin-browser-security
16
+
17
+ # Run tests with coverage
18
+ nx test eslint-plugin-browser-security --coverage
19
+
20
+ # Lint this package
21
+ nx lint eslint-plugin-browser-security
22
+ ```
23
+
24
+ ## Code Style
25
+
26
+ - TypeScript strict mode with `@interlace/eslint-devkit` types
27
+ - Use `AST_NODE_TYPES` constants, never string literals for node types
28
+ - Use `formatLLMMessage()` for all rule error messages
29
+ - Include CWE, CVSS, OWASP in every security message
30
+ - Use `c8 ignore` comments with documented reasons for untestable code
31
+ - Single-pass AST traversal patterns (O(n) complexity)
32
+
33
+ ## Testing Instructions
34
+
35
+ - Tests use `@typescript-eslint/rule-tester` with Vitest
36
+ - Each rule has `index.ts` (implementation) and `*.test.ts` (tests) in same directory
37
+ - Run specific rule test: `nx test eslint-plugin-browser-security --testPathPattern="no-innerhtml"`
38
+ - Coverage target: ≥90% lines, ≥95% functions
39
+ - All tests must pass before committing
40
+
41
+ ## Project Structure
42
+
43
+ ```
44
+ src/
45
+ ├── index.ts # Plugin entry, exports rules and 7 configs
46
+ └── rules/ # 21 rule directories
47
+ └── [rule-name]/
48
+ ├── index.ts # Rule implementation
49
+ └── *.test.ts # Rule tests
50
+ docs/rules/ # Markdown documentation per rule
51
+ ```
52
+
53
+ ## Plugin Purpose
54
+
55
+ Security-focused ESLint plugin with **21 rules** for browser application security. Covers XSS prevention, postMessage abuse, storage security, cookie security, WebSocket vulnerabilities, File API, Workers, and CSP.
56
+
57
+ ## Rule Categories
58
+
59
+ | Category | Rules | CWEs |
60
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------ |
61
+ | XSS Prevention | `no-innerhtml`, `no-eval` | 79, 95 |
62
+ | postMessage | `require-postmessage-origin-check`, `no-postmessage-wildcard-origin`, `no-postmessage-innerhtml` | 79, 346 |
63
+ | Storage | `no-sensitive-localstorage`, `no-sensitive-sessionstorage`, `no-sensitive-indexeddb`, `no-jwt-in-storage` | 922 |
64
+ | Cookies | `no-sensitive-cookie-js`, `no-cookie-auth-tokens`, `require-cookie-secure-attrs` | 614, 1004 |
65
+ | WebSocket | `require-websocket-wss`, `no-websocket-innerhtml`, `no-websocket-eval` | 79, 95, 319 |
66
+ | File API & Workers | `no-filereader-innerhtml`, `require-blob-url-revocation`, `no-dynamic-service-worker-url`, `no-worker-message-innerhtml` | 79, 401, 829 |
67
+ | CSP | `no-unsafe-inline-csp`, `no-unsafe-eval-csp` | 79, 95 |
68
+
69
+ ## Common Fix Patterns
70
+
71
+ ```typescript
72
+ // XSS - innerHTML
73
+ // BAD: element.innerHTML = userInput
74
+ // GOOD: element.textContent = userInput
75
+ // GOOD: element.innerHTML = DOMPurify.sanitize(userInput)
76
+
77
+ // postMessage origin check
78
+ // BAD: window.addEventListener('message', (e) => process(e.data))
79
+ // GOOD: window.addEventListener('message', (e) => {
80
+ // if (e.origin !== 'https://trusted.com') return;
81
+ // process(e.data);
82
+ // })
83
+
84
+ // Storage - JWT
85
+ // BAD: localStorage.setItem('token', jwt)
86
+ // GOOD: Use HttpOnly cookies set by server
87
+
88
+ // WebSocket
89
+ // BAD: new WebSocket('ws://example.com')
90
+ // GOOD: new WebSocket('wss://example.com')
91
+ ```
92
+
93
+ ## Security Considerations
94
+
95
+ - All rules map to OWASP Top 10 2021 categories
96
+ - CWE coverage: 79, 95, 319, 346, 401, 614, 829, 922, 1004
97
+ - Every rule message includes remediation guidance for both humans and LLMs
package/CHANGELOG.md ADDED
@@ -0,0 +1,148 @@
1
+ ## [1.2.3] - 2026-02-08
2
+
3
+ ## 1.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#213](https://github.com/ofri-peretz/eslint/pull/213) [`391dbe6`](https://github.com/ofri-peretz/eslint/commit/391dbe6b39f78d549379218567cb959649f8c614) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Align every security rule's `meta.docs.cvss` to the CVSS its finding actually
8
+ emits. The emitted machine-readable message sources its `CVSS:x` from
9
+ `CWE_MAPPING` via `formatLLMMessage` → `enrichFromCWE`, but the static
10
+ `meta.docs.cvss` documentation field had drifted on 45 rules across these 7
11
+ plugins — e.g. `no-hardcoded-credentials` documented `9.5` while emitting
12
+ `CVSS:9.8` (the value the published article and SARIF/LLM consumers already
13
+ read).
14
+
15
+ This corrects the **documentation metadata only** — no emitted finding changes.
16
+ Locked by `security-cvss-docs-consistency.lock.test.ts` (cross-plugin: every
17
+ security rule's `meta.docs.cvss` must equal the CVSS it emits), the
18
+ `no-hardcoded-credentials` rule lock (real ESLint `Linter` emission), and a
19
+ devkit `enrichFromCWE` contract test pinning `CWE-798 → 9.8`.
20
+
21
+ Follow-up (not in scope): 50 security rules document a CVSS that never appears
22
+ in any emitted message (their messages carry no CWE), and several rules emit the
23
+ generic CWE score where a rule-specific score may be warranted — both change
24
+ emitted output and are separate decisions.
25
+
26
+ ## 1.2.4
27
+
28
+ ### Patch Changes
29
+
30
+ - [#141](https://github.com/ofri-peretz/eslint/pull/141) [`38ab670`](https://github.com/ofri-peretz/eslint/commit/38ab670a0221684f4fd3d5dc3c05ddec7458ca2b) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - fix: remove false `meta.fixable: 'code'` declarations from 21 rules that had no `fix()` function
31
+
32
+ Rules that declared `fixable: 'code'` in their ESLint meta without an actual `fix()` implementation would show the ⚡ auto-fix icon in editors and CI formatters but apply no change when `--fix` was run. This patch removes the misleading declaration from:
33
+ - `browser-security/no-clickjacking`
34
+ - `import-next/first`, `named`, `no-barrel-import`, `no-import-module-exports`, `no-namespace`
35
+ - `node-security/no-buffer-overread`, `no-unsafe-dynamic-require`, `no-zip-slip`
36
+ - `react-features/react-no-inline-functions`
37
+ - `reliability/no-jsdoc-terminator-in-example` (uses `suggest`, not auto-fix; corrected to `hasSuggestions: true` only)
38
+ - `secure-coding/no-directive-injection`, `no-electron-security-issues`, `no-graphql-injection`, `no-improper-sanitization`, `no-improper-type-validation`, `no-ldap-injection`, `no-unchecked-loop-condition`, `no-unlimited-resource-allocation`, `no-weak-password-recovery`, `no-xpath-injection`
39
+
40
+ - Updated dependencies [[`736a5fe`](https://github.com/ofri-peretz/eslint/commit/736a5fed47e673f6157ea900b29fe2a54e4bc7df)]:
41
+ - @interlace/eslint-devkit@1.4.1
42
+
43
+ ### Bug Fixes
44
+
45
+ - align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
46
+ - resolve all benchmark FN/FP across security rules ([45ffb791](https://github.com/ofri-peretz/eslint/commit/45ffb791))
47
+
48
+ ### Documentation
49
+
50
+ - fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
51
+
52
+ ### ❤️ Thank You
53
+
54
+ - Ofri Peretz
55
+
56
+ ## [1.2.2] - 2026-02-06
57
+
58
+ ### Bug Fixes
59
+
60
+ - align codecov component names and update docs components ([0a59a86c](https://github.com/ofri-peretz/eslint/commit/0a59a86c))
61
+
62
+ ### ❤️ Thank You
63
+
64
+ - Ofri Peretz
65
+
66
+ ## [1.2.1] - 2026-02-02
67
+
68
+ This was a version bump only for eslint-plugin-browser-security to align it with other projects, there were no code changes.
69
+
70
+ # Changelog
71
+
72
+ All notable changes to `eslint-plugin-browser-security` will be documented in this file.
73
+
74
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
75
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
76
+
77
+ ### Documentation
78
+
79
+ - 📘 Launched new documentation site: [eslint.interlace.tools](https://eslint.interlace.tools/)
80
+
81
+ ## [1.0.0] - 2025-12-29
82
+
83
+ ### Added
84
+
85
+ #### XSS Prevention Rules (2)
86
+
87
+ - `no-innerhtml` - Detect dangerous innerHTML/outerHTML assignments (CWE-79)
88
+ - `no-eval` - Detect eval(), new Function(), and string-based callbacks (CWE-95)
89
+
90
+ #### postMessage Security Rules (3)
91
+
92
+ - `require-postmessage-origin-check` - Require origin validation in message handlers (CWE-346)
93
+ - `no-postmessage-wildcard-origin` - Prevent wildcard targetOrigin in postMessage (CWE-346)
94
+ - `no-postmessage-innerhtml` - Prevent XSS via innerHTML in postMessage handlers (CWE-79)
95
+
96
+ #### Storage Security Rules (4)
97
+
98
+ - `no-sensitive-localstorage` - Prevent storing sensitive data in localStorage (CWE-922)
99
+ - `no-sensitive-sessionstorage` - Prevent storing sensitive data in sessionStorage (CWE-922)
100
+ - `no-sensitive-indexeddb` - Prevent storing sensitive data in IndexedDB (CWE-922)
101
+ - `no-jwt-in-storage` - Prevent storing JWT tokens in browser storage (CWE-922)
102
+
103
+ #### Cookie Security Rules (3)
104
+
105
+ - `no-sensitive-cookie-js` - Prevent storing sensitive data in cookies via JavaScript (CWE-1004)
106
+ - `no-cookie-auth-tokens` - Prevent auth tokens in JS-accessible cookies (CWE-1004)
107
+ - `require-cookie-secure-attrs` - Require Secure and SameSite cookie attributes (CWE-614)
108
+
109
+ #### WebSocket Security Rules (3)
110
+
111
+ - `require-websocket-wss` - Require secure WebSocket connections (wss://) (CWE-319)
112
+ - `no-websocket-innerhtml` - Prevent XSS via innerHTML in WebSocket handlers (CWE-79)
113
+ - `no-websocket-eval` - Prevent RCE via eval() in WebSocket handlers (CWE-95)
114
+
115
+ #### File API & Workers Security Rules (4)
116
+
117
+ - `no-filereader-innerhtml` - Prevent XSS via innerHTML with FileReader data (CWE-79)
118
+ - `require-blob-url-revocation` - Require revoking Blob URLs to prevent memory leaks (CWE-401)
119
+ - `no-dynamic-service-worker-url` - Prevent dynamic URLs in service worker registration (CWE-829)
120
+ - `no-worker-message-innerhtml` - Prevent XSS via innerHTML in Worker message handlers (CWE-79)
121
+
122
+ #### CSP Security Rules (2)
123
+
124
+ - `no-unsafe-inline-csp` - Disallow 'unsafe-inline' in CSP (CWE-79)
125
+ - `no-unsafe-eval-csp` - Disallow 'unsafe-eval' in CSP (CWE-95)
126
+
127
+ #### Presets (7)
128
+
129
+ - `recommended` - Balanced security defaults
130
+ - `strict` - All 21 rules as errors
131
+ - `xss` - XSS-focused rules only
132
+ - `storage` - Storage security rules only
133
+ - `postmessage` - postMessage security rules only
134
+ - `websocket` - WebSocket security rules only
135
+ - `cookies` - Cookie security rules only
136
+
137
+ #### Features
138
+
139
+ - LLM-optimized error messages with CWE references
140
+ - OWASP Top 10 2021 alignment
141
+ - TypeScript support with exported option types
142
+ - Comprehensive test coverage (297 tests, 97.73% line coverage)
143
+ - Auto-fix suggestions where safe
144
+
145
+ ### Security
146
+
147
+ - Covers 8 CWEs: 79, 95, 319, 346, 401, 614, 829, 922, 1004
148
+ - Maps to OWASP Top 10 2021: A01, A02, A03
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://eslint.interlace.tools" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
2
+ <a href="https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -10,14 +10,15 @@
10
10
  <a href="https://www.npmjs.com/package/eslint-plugin-browser-security" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-browser-security.svg" alt="NPM Version" /></a>
11
11
  <a href="https://www.npmjs.com/package/eslint-plugin-browser-security" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-browser-security.svg" alt="NPM Downloads" /></a>
12
12
  <a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Package License" /></a>
13
- <a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=browser-security" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=eslint-plugin-browser-security" alt="Codecov" /></a>
13
+ <a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=browser-security" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=browser-security" alt="Codecov" /></a>
14
14
  <a href="https://github.com/ofri-peretz/eslint" target="_blank"><img src="https://img.shields.io/badge/Since-Dec_2025-blue?logo=rocket&logoColor=white" alt="Since Dec 2025" /></a>
15
15
  </p>
16
16
 
17
+ > ⭐ If this plugin caught a real bug for you, [**star the repo**](https://github.com/ofri-peretz/eslint) — it's the signal that keeps these rules maintained.
18
+
17
19
  ## Description
18
20
 
19
21
  This plugin provides Browser-specific security rules to prevent XSS and other client-side attacks.
20
- By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
21
22
 
22
23
  ## Philosophy
23
24
 
@@ -25,17 +26,47 @@ By using this plugin, you can proactively identify and mitigate security risks a
25
26
 
26
27
  ## Getting Started
27
28
 
28
- - To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-browser-security), visit [eslint.interlace.tools](https://eslint.interlace.tools). 📚
29
- - 要查看中文 [指南](https://eslint.interlace.tools/docs/security/plugin-browser-security), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools). 📚
30
- - [가이드](https://eslint.interlace.tools/docs/security/plugin-browser-security) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools)에서 확인하실 수 있습니다. 📚
31
- - [ガイド](https://eslint.interlace.tools/docs/security/plugin-browser-security)は [eslint.interlace.tools](https://eslint.interlace.tools)でご確認ください。 📚
32
- - Para ver la [guía](https://eslint.interlace.tools/docs/security/plugin-browser-security), visita [eslint.interlace.tools](https://eslint.interlace.tools). 📚
33
- - للاطلاع على [الدليل](https://eslint.interlace.tools/docs/security/plugin-browser-security)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools). 📚
29
+ - To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security). 📚
30
+ - 要查看中文 [指南](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security). 📚
31
+ - [가이드](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security)에서 확인하실 수 있습니다. 📚
32
+ - [ガイド](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security)は [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security)でご確認ください。 📚
33
+ - Para ver la [guía](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security), visita [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security). 📚
34
+ - للاطلاع على [الدليل](https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security). 📚
34
35
 
35
36
  ```bash
36
37
  npm install eslint-plugin-browser-security --save-dev
37
38
  ```
38
39
 
40
+ ## ⚙️ Configuration Presets
41
+ | Preset | Description |
42
+ | :------------ | :-------------------------------------------------- |
43
+ | `recommended` | Recommended security configuration |
44
+ | `strict` | Strict security configuration - all rules as errors |
45
+
46
+ ## 🤖 LLM-Optimized Messages
47
+ All rules include structured remediation guidance designed for AI assistants:
48
+
49
+ ```
50
+ [browser-security/no-innerhtml] XSS vulnerability: Direct HTML assignment detected.
51
+
52
+ 📋 CONTEXT:
53
+ • Pattern: element.innerHTML = unsanitizedInput
54
+ • Risk: Any script in unsanitizedInput will execute
55
+
56
+ 🛠️ REMEDIATION:
57
+ Option A (Preferred): Use textContent for plain text
58
+ element.textContent = userInput;
59
+
60
+ Option B: Sanitize before insertion
61
+ element.innerHTML = DOMPurify.sanitize(userInput);
62
+
63
+ 📚 References:
64
+ • CWE-79: https://cwe.mitre.org/data/definitions/79.html
65
+ • OWASP XSS Prevention: https://owasp.org/...
66
+ ```
67
+
68
+ By providing this structured context (CWE, OWASP, Fix), we enable AI tools to **reason** about the security flaw rather than hallucinating. This allows Copilot/Cursor to suggest the _exact_ correct fix immediately.
69
+
39
70
  ## 💡 What You Get
40
71
  - **21 security rules** targeting browser-specific vulnerabilities
41
72
  - **XSS prevention** via DOM manipulation and dynamic content detection
@@ -91,35 +122,13 @@ window.addEventListener('message', (event) => {
91
122
  });
92
123
  ```
93
124
 
94
- ## ⚙️ Configuration Presets
95
- | Preset | Description |
96
- | :------------ | :-------------------------------------------------- |
97
- | `recommended` | Recommended security configuration |
98
- | `strict` | Strict security configuration - all rules as errors |
99
-
100
- ## 🤖 LLM-Optimized Messages
101
- All rules include structured remediation guidance designed for AI assistants:
102
-
103
- ```
104
- [browser-security/no-innerhtml] XSS vulnerability: Direct HTML assignment detected.
105
-
106
- 📋 CONTEXT:
107
- • Pattern: element.innerHTML = unsanitizedInput
108
- • Risk: Any script in unsanitizedInput will execute
109
-
110
- 🛠️ REMEDIATION:
111
- Option A (Preferred): Use textContent for plain text
112
- element.textContent = userInput;
113
-
114
- Option B: Sanitize before insertion
115
- element.innerHTML = DOMPurify.sanitize(userInput);
116
-
117
- 📚 References:
118
- • CWE-79: https://cwe.mitre.org/data/definitions/79.html
119
- • OWASP XSS Prevention: https://owasp.org/...
120
- ```
125
+ ## 📦 Compatibility
126
+ | Package | Version |
127
+ | :--- | :--- |
128
+ | ESLint | `^8.0.0 \|\| ^9.0.0 \|\| ^10.0.0` |
129
+ | Node.js | `>=18.0.0` |
121
130
 
122
- By providing this structured context (CWE, OWASP, Fix), we enable AI tools to **reason** about the security flaw rather than hallucinating. This allows Copilot/Cursor to suggest the _exact_ correct fix immediately.
131
+ See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
123
132
 
124
133
  ## Rules
125
134
 
@@ -128,59 +137,63 @@ By providing this structured context (CWE, OWASP, Fix), we enable AI tools to **
128
137
  | Icon | Description |
129
138
  | :---: | :--- |
130
139
  | 💼 | **Recommended**: Included in the recommended preset. |
131
- | ⚠️ | **Warns**: Set towarn in recommended preset. |
140
+ | ⚠️ | **Warns**: Set to warn in recommended preset. |
132
141
  | 🔧 | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
133
142
  | 💡 | **Suggestions**: Providing code suggestions in IDE. |
134
143
  | 🚫 | **Deprecated**: This rule is deprecated. |
135
-
136
- | Rule | CWE | OWASP | CVSS | Description | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
137
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
138
- | [detect-mixed-content](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/detect-mixed-content) | | | | ESLint rule documentation for detect-mixed-content | | | | | |
139
- | [no-allow-arbitrary-loads](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-allow-arbitrary-loads) | | | | ESLint rule documentation for no-allow-arbitrary-loads | | | | | |
140
- | [no-clickjacking](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-clickjacking) | | | | ESLint rule documentation for no-clickjacking | | | | | |
141
- | [no-client-side-auth-logic](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-client-side-auth-logic) | | | | ESLint rule documentation for no-client-side-auth-logic | | | | | |
142
- | [no-cookie-auth-tokens](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-cookie-auth-tokens) | CWE-1004 | A02:2025 | 5.3 | ESLint rule documentation for no-cookie-auth-tokens | 💼 | | | 💡 | |
143
- | [no-credentials-in-query-params](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-credentials-in-query-params) | | | | ESLint rule documentation for no-credentials-in-query-params | | | | | |
144
- | [no-disabled-certificate-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-disabled-certificate-validation) | | | | ESLint rule documentation for no-disabled-certificate-validation | | | | | |
145
- | [no-dynamic-service-worker-url](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-dynamic-service-worker-url) | CWE-829 | A08:2025 | 7.5 | ESLint rule documentation for no-dynamic-service-worker-url | 💼 | | | 💡 | |
146
- | [no-eval](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-eval) | CWE-95 | A03:2025 | 9.8 | ESLint rule documentation for no-eval | 💼 | | | 💡 | 🚫 |
147
- | [no-filereader-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-filereader-innerhtml) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-filereader-innerhtml | 💼 | | | 💡 | |
148
- | [no-http-urls](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-http-urls) | | | | ESLint rule documentation for no-http-urls | | | | | |
149
- | [no-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-innerhtml) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-innerhtml | 💼 | | | 💡 | |
150
- | [no-insecure-redirects](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-insecure-redirects) | | | | ESLint rule documentation for no-insecure-redirects | | | | | |
151
- | [no-insecure-websocket](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-insecure-websocket) | | | | ESLint rule documentation for no-insecure-websocket | | | | | |
152
- | [no-jwt-in-storage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-jwt-in-storage) | CWE-922 | A02:2025 | 7.5 | ESLint rule documentation for no-jwt-in-storage | 💼 | | | 💡 | |
153
- | [no-missing-cors-check](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-cors-check) | | | | ESLint rule documentation for no-missing-cors-check | | | | | |
154
- | [no-missing-csrf-protection](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-csrf-protection) | | | | ESLint rule documentation for no-missing-csrf-protection | | | | | |
155
- | [no-missing-security-headers](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-security-headers) | | | | ESLint rule documentation for no-missing-security-headers | | | | | |
156
- | [no-password-in-url](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-password-in-url) | | | | ESLint rule documentation for no-password-in-url | | | | | |
157
- | [no-permissive-cors](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-permissive-cors) | | | | ESLint rule documentation for no-permissive-cors | | | | | |
158
- | [no-postmessage-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-postmessage-innerhtml) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-postmessage-innerhtml | 💼 | | | | |
159
- | [no-postmessage-wildcard-origin](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-postmessage-wildcard-origin) | CWE-346 | A01:2025 | 8.8 | ESLint rule documentation for no-postmessage-wildcard-origin | 💼 | | | | |
160
- | [no-sensitive-cookie-js](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-cookie-js) | CWE-1004 | A02:2025 | 5.3 | ESLint rule documentation for no-sensitive-cookie-js | 💼 | | | 💡 | |
161
- | [no-sensitive-data-in-analytics](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-data-in-analytics) | | | | ESLint rule documentation for no-sensitive-data-in-analytics | | | | | |
162
- | [no-sensitive-data-in-cache](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-data-in-cache) | | | | ESLint rule documentation for no-sensitive-data-in-cache | | | | | |
163
- | [no-sensitive-indexeddb](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-indexeddb) | CWE-922 | A02:2025 | 7.5 | ESLint rule documentation for no-sensitive-indexeddb | 💼 | | | 💡 | |
164
- | [no-sensitive-localstorage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-localstorage) | CWE-922 | A02:2025 | 7.5 | ESLint rule documentation for no-sensitive-localstorage | 💼 | | | 💡 | |
165
- | [no-sensitive-sessionstorage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-sessionstorage) | CWE-922 | A02:2025 | 7.5 | ESLint rule documentation for no-sensitive-sessionstorage | 💼 | | | 💡 | |
166
- | [no-tracking-without-consent](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-tracking-without-consent) | | | | ESLint rule documentation for no-tracking-without-consent | | | | | |
167
- | [no-unencrypted-transmission](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unencrypted-transmission) | | | | ESLint rule documentation for no-unencrypted-transmission | | | | | |
168
- | [no-unescaped-url-parameter](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unescaped-url-parameter) | | | | ESLint rule documentation for no-unescaped-url-parameter | | | | | |
169
- | [no-unsafe-eval-csp](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unsafe-eval-csp) | CWE-95 | A03:2025 | 9.8 | ESLint rule documentation for no-unsafe-eval-csp | 💼 | | | 💡 | |
170
- | [no-unsafe-inline-csp](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unsafe-inline-csp) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-unsafe-inline-csp | 💼 | | | 💡 | |
171
- | [no-unvalidated-deeplinks](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unvalidated-deeplinks) | | | | ESLint rule documentation for no-unvalidated-deeplinks | | | | | |
172
- | [no-websocket-eval](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-websocket-eval) | CWE-95 | A03:2025 | 9.8 | ESLint rule documentation for no-websocket-eval | 💼 | | | 💡 | |
173
- | [no-websocket-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-websocket-innerhtml) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-websocket-innerhtml | 💼 | | | 💡 | |
174
- | [no-worker-message-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-worker-message-innerhtml) | CWE-79 | A03:2025 | 6.1 | ESLint rule documentation for no-worker-message-innerhtml | 💼 | | | | |
175
- | [require-blob-url-revocation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-blob-url-revocation) | CWE-401 | A04:2025 | 5.3 | ESLint rule documentation for require-blob-url-revocation | 💼 | ⚠️ | | 💡 | |
176
- | [require-cookie-secure-attrs](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-cookie-secure-attrs) | CWE-614 | A05:2025 | 5.3 | ESLint rule documentation for require-cookie-secure-attrs | 💼 | | | | 🚫 |
177
- | [require-csp-headers](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-csp-headers) | | | | ESLint rule documentation for require-csp-headers | | | | | |
178
- | [require-https-only](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-https-only) | | | | ESLint rule documentation for require-https-only | | | | | |
179
- | [require-mime-type-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-mime-type-validation) | | | | ESLint rule documentation for require-mime-type-validation | | | | | |
180
- | [require-postmessage-origin-check](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-postmessage-origin-check) | CWE-346 | A01:2025 | 8.8 | ESLint rule documentation for require-postmessage-origin-check | 💼 | | | | |
181
- | [require-url-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-url-validation) | | | | ESLint rule documentation for require-url-validation | | | | | |
182
- | [require-websocket-wss](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-websocket-wss) | CWE-319 | A02:2025 | 7.5 | ESLint rule documentation for require-websocket-wss | 💼 | | | 💡 | 🚫 |
183
-
144
+ | 🟢 | **Type-unaware**: AST-only, runs in oxlint JS-plugin tier. |
145
+ | 🟡 | **Type-aware (refining)**: pure-AST primary path; types refine precision. |
146
+ | 🟠 | **Type-aware (graceful)**: requires TS program; silent without it. |
147
+
148
+ <!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
149
+ | Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
150
+ | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
151
+ | [detect-mixed-content](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/detect-mixed-content?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-311 | | | Detects HTTP URLs in code that should use HTTPS, preventing mixed content vulnerabilities. | 🟢 | | | | | |
152
+ | [no-allow-arbitrary-loads](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-allow-arbitrary-loads?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-295 | | | Prevents disabling App Transport Security (ATS) by detecting allowArbitraryLoads: true in configuration. | 🟢 | | | | | |
153
+ | [no-clickjacking](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-clickjacking?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-1021 | | | Detects clickjacking vulnerabilities and missing frame protections | 🟢 | | | | | |
154
+ | [no-client-side-auth-logic](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-client-side-auth-logic?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | | | | Prevent client-side authentication logic that can be bypassed. This rule is part of eslint-plugin-browser-s… | 🟢 | | | | | |
155
+ | [no-cookie-auth-tokens](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-cookie-auth-tokens?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-1004 | A02:2021 | | Prevent storing authentication tokens in JavaScript-accessible cookies. | 🟢 | | | | | |
156
+ | [no-credentials-in-query-params](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-credentials-in-query-params?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-598 | | | CWE: [CWE-598](https://cwe.mitre.org/data/definitions/598.html) | 🟢 | | | | | |
157
+ | [no-disabled-certificate-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-disabled-certificate-validation?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-295 | | | CWE: [CWE-295](https://cwe.mitre.org/data/definitions/295.html) | 🟢 | | | | | |
158
+ | [no-dynamic-service-worker-url](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-dynamic-service-worker-url?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-829 | A08:2021 | | Prevent dynamic URLs in service worker registration. | 🟢 | | | | | |
159
+ | [no-eval](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-eval?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-94 | | | Detects dangerous eval() and similar code execution patterns | 🟢 | 💼 | | | | |
160
+ | [no-filereader-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-filereader-innerhtml?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-693 | A03:2021 | | The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance: | 🟢 | | | | | |
161
+ | [no-http-urls](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-http-urls?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | | | CWE: [CWE-319](https://cwe.mitre.org/data/definitions/319.html) | 🟢 | | | | | |
162
+ | [no-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-innerhtml?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-79 | | | Detects dangerous innerHTML/outerHTML assignments that can lead to Cross-Site Scripting (XSS) | 🟢 | 💼 | | | | |
163
+ | [no-insecure-redirects](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-insecure-redirects?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-601 | | | ESLint Rule: no-insecure-redirects | 🟢 | | | | | |
164
+ | [no-insecure-websocket](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-insecure-websocket?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | | | CWE: [CWE-319](https://cwe.mitre.org/data/definitions/319.html) | 🟢 | | | | | |
165
+ | [no-jwt-in-storage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-jwt-in-storage?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-311 | A02:2021 | | This rule prevents storing JWT tokens in browser storage (localStorage/sessionStorage) | 🟢 | | | | | |
166
+ | [no-missing-cors-check](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-cors-check?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-346 | | | Detects missing CORS validation (wildcard CORS, missing origin check) that can allow unauthorized cross-ori… | 🟢 | | | | | |
167
+ | [no-missing-csrf-protection](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-csrf-protection?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-352 | | | Detects missing CSRF token validation in POST/PUT/DELETE requests | 🟢 | | | | | |
168
+ | [no-missing-security-headers](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-missing-security-headers?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-693 | | | ESLint Rule: no-missing-security-headers | 🟢 | | | | | |
169
+ | [no-password-in-url](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-password-in-url?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-521 | | | This rule detects when URLs contain password-related query parameters or URL fragments | 🟢 | | | | | |
170
+ | [no-permissive-cors](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-permissive-cors?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-942 | | | CWE: [CWE-942](https://cwe.mitre.org/data/definitions/942.html) | 🟢 | | | | | |
171
+ | [no-postmessage-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-postmessage-innerhtml?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-693 | A03:2021 | | The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance: | 🟢 | | | | | |
172
+ | [no-postmessage-wildcard-origin](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-postmessage-wildcard-origin?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-693 | A01:2021 | | This rule prevents using \\"\\" as the targetOrigin parameter in postMessage() calls | 🟢 | | | | | |
173
+ | [no-sensitive-cookie-js](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-cookie-js?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-359 | A02:2021 | | The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance: | 🟢 | | | | | |
174
+ | [no-sensitive-data-in-analytics](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-data-in-analytics?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-359 | | | This rule detects when sensitive user data (email, SSN, credit card, password, phone, address) is passed to… | 🟢 | | | | | |
175
+ | [no-sensitive-data-in-cache](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-data-in-cache?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-200 | | | CWE: [CWE-200](https://cwe.mitre.org/data/definitions/200.html) | 🟢 | | | | | |
176
+ | [no-sensitive-indexeddb](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-indexeddb?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-922 | A02:2021 | | Prevent storing sensitive data in IndexedDB. | 🟢 | | | | | |
177
+ | [no-sensitive-localstorage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-localstorage?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-922 | | | Detects storage of sensitive data (tokens, passwords, PII) in localStorage | 🟢 | | | | | |
178
+ | [no-sensitive-sessionstorage](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-sensitive-sessionstorage?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-922 | A02:2021 | | Prevent storing sensitive data in sessionStorage. | 🟢 | | | | | |
179
+ | [no-tracking-without-consent](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-tracking-without-consent?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-359 | | | CWE: [CWE-359](https://cwe.mitre.org/data/definitions/359.html) | 🟢 | | | | | |
180
+ | [no-unencrypted-transmission](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unencrypted-transmission?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | | | Detects unencrypted data transmission (HTTP vs HTTPS, plain text protocols) | 🟢 | | | | | |
181
+ | [no-unescaped-url-parameter](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unescaped-url-parameter?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-79 | | | Detects unescaped URL parameters that can lead to Cross-Site Scripting (XSS) or open redirect vulnerabilities | 🟢 | | | | | |
182
+ | [no-unsafe-eval-csp](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unsafe-eval-csp?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-95 | A03:2021 | | Disallow 'unsafe-eval' in Content Security Policy directives. | 🟢 | | | | | |
183
+ | [no-unsafe-inline-csp](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unsafe-inline-csp?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-79 | A03:2021 | | Disallow 'unsafe-inline' in Content Security Policy directives. | 🟢 | | | | | |
184
+ | [no-unvalidated-deeplinks](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-unvalidated-deeplinks?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-939 | | | This rule detects when deep link URLs are opened without validation in React Native or mobile web apps | 🟢 | | | | | |
185
+ | [no-websocket-eval](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-websocket-eval?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | A03:2021 | | The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance: | 🟢 | | | | | |
186
+ | [no-websocket-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-websocket-innerhtml?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | A03:2021 | | The rule provides LLM-optimized error messages (Compact 2-line format) with actionable security guidance: | 🟢 | | | | | |
187
+ | [no-worker-message-innerhtml](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/no-worker-message-innerhtml?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-79 | A03:2021 | | Disallow using innerHTML with Web Worker message data. | 🟢 | | | | | |
188
+ | [require-blob-url-revocation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-blob-url-revocation?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-401 | A04:2021 | | Require revoking Blob URLs after use to prevent memory leaks. | 🟢 | | | | | |
189
+ | [require-cookie-secure-attrs](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-cookie-secure-attrs?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-614 | A05:2021 | | Require Secure and SameSite attributes on cookies. | 🟢 | | | | | |
190
+ | [require-csp-headers](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-csp-headers?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-1021 | | | CWE: [CWE-1021](https://cwe.mitre.org/data/definitions/1021.html) | 🟢 | | | | | |
191
+ | [require-https-only](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-https-only?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | | | This rule detects HTTP (unencrypted) URLs in fetch() and axios requests | 🟢 | | | | | |
192
+ | [require-mime-type-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-mime-type-validation?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-434 | | | CWE: [CWE-434](https://cwe.mitre.org/data/definitions/434.html) | 🟢 | | | | | |
193
+ | [require-postmessage-origin-check](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-postmessage-origin-check?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-346 | | | Detects postMessage event handlers without origin validation | 🟢 | | | | | |
194
+ | [require-url-validation](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-url-validation?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-601 | | | CWE: [CWE-601](https://cwe.mitre.org/data/definitions/601.html) | 🟢 | | | | | |
195
+ | [require-websocket-wss](https://eslint.interlace.tools/docs/security/plugin-browser-security/rules/require-websocket-wss?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security) | CWE-319 | A02:2021 | | This rule enforces the use of wss:// (WebSocket Secure) protocol instead of ws:// (unencrypted WebSocket) | 🟢 | | | | | |
196
+ <!-- AUTO-GENERATED:RULES_TABLE:END -->
184
197
  ## 🔗 Related ESLint Plugins
185
198
 
186
199
  Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with LLM-optimized error messages:
@@ -189,7 +202,7 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
189
202
  | :--- | :---: | :--- |
190
203
  | [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-secure-coding.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
191
204
  | [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-pg.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
192
- | [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-crypto.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
205
+ | [`eslint-plugin-node-security`](https://www.npmjs.com/package/eslint-plugin-node-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-node-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-node-security) | Node.js core-module security (fs, child_process, vm, crypto, Buffer). |
193
206
  | [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-jwt.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
194
207
  | [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-browser-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
195
208
  | [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-express-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
@@ -199,10 +212,19 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
199
212
  | [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-vercel-ai-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security hardening. |
200
213
  | [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-import-next.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-import-next) | Next-gen import sorting & architecture. |
201
214
 
215
+ <!-- INTERLACE:STAR_CTA:START -->
216
+ ## ⭐ Support & follow
217
+
218
+ If this plugin caught a real bug for you, **[star the repo](https://github.com/ofri-peretz/eslint)** — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and **[follow the writeups on Dev.to](https://dev.to/ofri-peretz)** for the benchmarks and security research behind these rules.
219
+
220
+ [![GitHub stars](https://img.shields.io/github/stars/ofri-peretz/eslint?style=social)](https://github.com/ofri-peretz/eslint)
221
+
222
+ <!-- INTERLACE:STAR_CTA:END -->
223
+
202
224
  ## 📄 License
203
225
 
204
226
  MIT © [Ofri Peretz](https://github.com/ofri-peretz)
205
227
 
206
228
  <p align="center">
207
- <a href="https://eslint.interlace.tools/docs/security/plugin-browser-security"><img src="https://eslint.interlace.tools/images/og-browser-security.png" alt="ESLint Interlace Plugin" width="100%" /></a>
229
+ <a href="https://eslint.interlace.tools/docs/security/plugin-browser-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-browser-security"><img src="https://eslint.interlace.tools/images/og-browser-security.png" alt="ESLint Interlace Plugin" width="100%" /></a>
208
230
  </p>