eslint-plugin-browser-security 1.1.0 โ 1.1.1
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.
- package/README.md +92 -133
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
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>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
</
|
|
5
|
+
<p align="center">
|
|
6
|
+
Browser-specific security rules to prevent XSS and other client-side attacks.
|
|
7
|
+
</p>
|
|
6
8
|
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
|
|
9
|
+
<p align="center">
|
|
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
|
+
<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
|
+
<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=browser-security" alt="Codecov" /></a>
|
|
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
|
+
</p>
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
This plugin provides a suite of browser-specific security rules designed to prevent Cross-Site Scripting (XSS) and other client-side vulnerabilities. It scans your code for dangerous patterns, such as unsafe DOM manipulation and insecure storage practices, offering real-time feedback to developers. Using this plugin ensures that your frontend applications adhere to modern security standards and protect user data effectively.
|
|
20
|
+
|
|
21
|
+
## Philosophy
|
|
22
|
+
|
|
23
|
+
**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.
|
|
24
|
+
|
|
25
|
+
## Getting Started
|
|
26
|
+
|
|
27
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/browser-security), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/browser-security), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/browser-security) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
30
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/browser-security)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
31
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/browser-security), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/browser-security)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install eslint-plugin-browser-security --save-dev
|
|
36
|
+
```
|
|
16
37
|
|
|
17
38
|
## ๐ก What You Get
|
|
18
39
|
|
|
@@ -33,108 +54,6 @@ Modern browser applications face unique security challenges across storage APIs,
|
|
|
33
54
|
- **Cookie Security**: Identifies insecure cookie handling in JavaScript
|
|
34
55
|
- **LLM-Optimized**: All rules include AI-friendly remediation guidance
|
|
35
56
|
|
|
36
|
-
## ๐ฆ Installation
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install eslint-plugin-browser-security --save-dev
|
|
40
|
-
# or
|
|
41
|
-
pnpm add -D eslint-plugin-browser-security
|
|
42
|
-
# or
|
|
43
|
-
yarn add -D eslint-plugin-browser-security
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## ๐ Quick Start
|
|
47
|
-
|
|
48
|
-
### Flat Config (ESLint 9+)
|
|
49
|
-
|
|
50
|
-
```javascript
|
|
51
|
-
// eslint.config.js
|
|
52
|
-
import browserSecurity from 'eslint-plugin-browser-security';
|
|
53
|
-
|
|
54
|
-
export default [
|
|
55
|
-
{
|
|
56
|
-
plugins: {
|
|
57
|
-
'browser-security': browserSecurity,
|
|
58
|
-
},
|
|
59
|
-
rules: {
|
|
60
|
-
'browser-security/no-eval': 'error',
|
|
61
|
-
'browser-security/no-innerhtml': 'error',
|
|
62
|
-
'browser-security/no-sensitive-localstorage': 'error',
|
|
63
|
-
'browser-security/require-postmessage-origin-check': 'error',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Using Recommended Config
|
|
70
|
-
|
|
71
|
-
```javascript
|
|
72
|
-
// eslint.config.js
|
|
73
|
-
import browserSecurity from 'eslint-plugin-browser-security';
|
|
74
|
-
|
|
75
|
-
export default [browserSecurity.configs.recommended];
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## ๐ Rules (21 total)
|
|
79
|
-
|
|
80
|
-
๐ผ = Set in `recommended` | ๐ง = Auto-fixable | ๐ก = Has suggestions
|
|
81
|
-
|
|
82
|
-
### XSS Prevention
|
|
83
|
-
|
|
84
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
85
|
-
| :------------------------------------------- | :----: | :------: | :--: | :---------------------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
86
|
-
| [no-eval](./docs/rules/no-eval.md) | CWE-95 | A03:2021 | | Prevent code injection via `eval()`, `new Function()` | ๐ผ | | | ๐ก | |
|
|
87
|
-
| [no-innerhtml](./docs/rules/no-innerhtml.md) | CWE-79 | A03:2021 | | Prevent XSS via `innerHTML`, `outerHTML` | ๐ผ | | | ๐ก | |
|
|
88
|
-
|
|
89
|
-
### postMessage Security
|
|
90
|
-
|
|
91
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
92
|
-
| :----------------------------------------------------------------------------------- | :-----: | :------: | :--: | :------------------------------------------------ | :-: | :-: | :-: | :-: | :-: |
|
|
93
|
-
| [require-postmessage-origin-check](./docs/rules/require-postmessage-origin-check.md) | CWE-346 | A01:2021 | | Require origin validation in postMessage handlers | ๐ผ | | | ๐ก | |
|
|
94
|
-
| [no-postmessage-wildcard-origin](./docs/rules/no-postmessage-wildcard-origin.md) | CWE-346 | A01:2021 | | Prevent wildcard targetOrigin in postMessage | ๐ผ | | | ๐ก | |
|
|
95
|
-
| [no-postmessage-innerhtml](./docs/rules/no-postmessage-innerhtml.md) | CWE-79 | A03:2021 | | Prevent XSS via innerHTML in postMessage handlers | ๐ผ | | | ๐ก | |
|
|
96
|
-
|
|
97
|
-
### Storage Security
|
|
98
|
-
|
|
99
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
100
|
-
| :------------------------------------------------------------------------- | :-----: | :------: | :--: | :--------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
101
|
-
| [no-sensitive-localstorage](./docs/rules/no-sensitive-localstorage.md) | CWE-922 | A02:2021 | | Prevent sensitive data in localStorage | ๐ผ | | | ๐ก | |
|
|
102
|
-
| [no-sensitive-sessionstorage](./docs/rules/no-sensitive-sessionstorage.md) | CWE-922 | A02:2021 | | Prevent sensitive data in sessionStorage | ๐ผ | | | ๐ก | |
|
|
103
|
-
| [no-sensitive-indexeddb](./docs/rules/no-sensitive-indexeddb.md) | CWE-922 | A02:2021 | | Prevent sensitive data in IndexedDB | ๐ผ | | | ๐ก | |
|
|
104
|
-
| [no-jwt-in-storage](./docs/rules/no-jwt-in-storage.md) | CWE-922 | A02:2021 | | Prevent JWT tokens in browser storage | ๐ผ | | | ๐ก | |
|
|
105
|
-
|
|
106
|
-
### Cookie Security
|
|
107
|
-
|
|
108
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
109
|
-
| :------------------------------------------------------------------------- | :------: | :------: | :--: | :------------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
110
|
-
| [no-sensitive-cookie-js](./docs/rules/no-sensitive-cookie-js.md) | CWE-1004 | A02:2021 | | Prevent sensitive data in cookies via JS | ๐ผ | | | ๐ก | |
|
|
111
|
-
| [no-cookie-auth-tokens](./docs/rules/no-cookie-auth-tokens.md) | CWE-1004 | A02:2021 | | Prevent auth tokens in JS-accessible cookies | ๐ผ | | | ๐ก | |
|
|
112
|
-
| [require-cookie-secure-attrs](./docs/rules/require-cookie-secure-attrs.md) | CWE-614 | A05:2021 | | Require Secure and SameSite attributes | ๐ผ | | | ๐ก | |
|
|
113
|
-
|
|
114
|
-
### WebSocket Security
|
|
115
|
-
|
|
116
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
117
|
-
| :--------------------------------------------------------------- | :-----: | :------: | :--: | :-------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
118
|
-
| [require-websocket-wss](./docs/rules/require-websocket-wss.md) | CWE-319 | A02:2021 | | Require secure WebSocket (wss://) | ๐ผ | | | ๐ก | |
|
|
119
|
-
| [no-websocket-innerhtml](./docs/rules/no-websocket-innerhtml.md) | CWE-79 | A03:2021 | | Prevent XSS in WebSocket handlers | ๐ผ | | | ๐ก | |
|
|
120
|
-
| [no-websocket-eval](./docs/rules/no-websocket-eval.md) | CWE-95 | A03:2021 | | Prevent RCE in WebSocket handlers | ๐ผ | | | ๐ก | |
|
|
121
|
-
|
|
122
|
-
### File API & Workers Security
|
|
123
|
-
|
|
124
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
125
|
-
| :----------------------------------------------------------------------------- | :-----: | :------: | :--: | :---------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
126
|
-
| [no-filereader-innerhtml](./docs/rules/no-filereader-innerhtml.md) | CWE-79 | A03:2021 | | Prevent XSS with FileReader data | ๐ผ | | | ๐ก | |
|
|
127
|
-
| [require-blob-url-revocation](./docs/rules/require-blob-url-revocation.md) | CWE-401 | A04:2021 | | Require revoking Blob URLs | ๐ผ | | | ๐ก | |
|
|
128
|
-
| [no-dynamic-service-worker-url](./docs/rules/no-dynamic-service-worker-url.md) | CWE-829 | A08:2021 | | Prevent dynamic service worker URLs | ๐ผ | | | ๐ก | |
|
|
129
|
-
| [no-worker-message-innerhtml](./docs/rules/no-worker-message-innerhtml.md) | CWE-79 | A03:2021 | | Prevent XSS in Worker handlers | ๐ผ | | | ๐ก | |
|
|
130
|
-
|
|
131
|
-
### CSP Security
|
|
132
|
-
|
|
133
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
134
|
-
| :----------------------------------------------------------- | :----: | :------: | :--: | :------------------------------ | :-: | :-: | :-: | :-: | :-: |
|
|
135
|
-
| [no-unsafe-inline-csp](./docs/rules/no-unsafe-inline-csp.md) | CWE-79 | A03:2021 | | Disallow 'unsafe-inline' in CSP | ๐ผ | | | ๐ก | |
|
|
136
|
-
| [no-unsafe-eval-csp](./docs/rules/no-unsafe-eval-csp.md) | CWE-95 | A03:2021 | | Disallow 'unsafe-eval' in CSP | ๐ผ | | | ๐ก | |
|
|
137
|
-
|
|
138
57
|
## ๐ Detection Examples
|
|
139
58
|
|
|
140
59
|
### โ Vulnerable Code
|
|
@@ -174,14 +93,12 @@ window.addEventListener('message', (event) => {
|
|
|
174
93
|
});
|
|
175
94
|
```
|
|
176
95
|
|
|
177
|
-
##
|
|
96
|
+
## โ๏ธ Configuration Presets
|
|
178
97
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `no-sensitive-localstorage` | | A02: Cryptographic Failures | | | | | | | |
|
|
184
|
-
| `require-postmessage-origin-check` | | A01: Broken Access Control | | | | | | | |
|
|
98
|
+
| Preset | Description |
|
|
99
|
+
| :------------ | :-------------------------------------------------- |
|
|
100
|
+
| `recommended` | Recommended security configuration |
|
|
101
|
+
| `strict` | Strict security configuration - all rules as errors |
|
|
185
102
|
|
|
186
103
|
## ๐ค LLM-Optimized Messages
|
|
187
104
|
|
|
@@ -206,22 +123,64 @@ All rules include structured remediation guidance designed for AI assistants:
|
|
|
206
123
|
โข OWASP XSS Prevention: https://owasp.org/...
|
|
207
124
|
```
|
|
208
125
|
|
|
209
|
-
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
## Rules
|
|
129
|
+
|
|
130
|
+
**Legend**
|
|
131
|
+
|
|
132
|
+
| Icon | Description |
|
|
133
|
+
| :--: | :----------------------------------------------------------------- |
|
|
134
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
135
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
136
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
137
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
138
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
139
|
+
|
|
140
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
141
|
+
| :------------------------------------------------------------------------------------------------------------------------------ | :------: | :------: | :--: | :----------------------------------------------------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
142
|
+
| [no-eval](https://eslint.interlace.tools/docs/browser-security/rules/no-eval) | CWE-95 | A03:2025 | 9.8 | [no-eval](./docs/rules/no-eval.md) | ๐ผ | | | ๐ก | ๐ซ |
|
|
143
|
+
| [no-innerhtml](https://eslint.interlace.tools/docs/browser-security/rules/no-innerhtml) | CWE-79 | A03:2025 | 6.1 | [no-innerhtml](./docs/rules/no-innerhtml.md) | ๐ผ | | | ๐ก | |
|
|
144
|
+
| [require-postmessage-origin-check](https://eslint.interlace.tools/docs/browser-security/rules/require-postmessage-origin-check) | CWE-346 | A01:2025 | 8.8 | [require-postmessage-origin-check](./docs/rules/require-postmessage-origin-check.md) | ๐ผ | | | | |
|
|
145
|
+
| [no-postmessage-wildcard-origin](https://eslint.interlace.tools/docs/browser-security/rules/no-postmessage-wildcard-origin) | CWE-346 | A01:2025 | 8.8 | [no-postmessage-wildcard-origin](./docs/rules/no-postmessage-wildcard-origin.md) | ๐ผ | | | | |
|
|
146
|
+
| [no-postmessage-innerhtml](https://eslint.interlace.tools/docs/browser-security/rules/no-postmessage-innerhtml) | CWE-79 | A03:2025 | 6.1 | [no-postmessage-innerhtml](./docs/rules/no-postmessage-innerhtml.md) | ๐ผ | | | | |
|
|
147
|
+
| [no-sensitive-localstorage](https://eslint.interlace.tools/docs/browser-security/rules/no-sensitive-localstorage) | CWE-922 | A02:2025 | 7.5 | [no-sensitive-localstorage](./docs/rules/no-sensitive-localstorage.md) | ๐ผ | | | ๐ก | |
|
|
148
|
+
| [no-sensitive-sessionstorage](https://eslint.interlace.tools/docs/browser-security/rules/no-sensitive-sessionstorage) | CWE-922 | A02:2025 | 7.5 | [no-sensitive-sessionstorage](./docs/rules/no-sensitive-sessionstorage.md) | ๐ผ | | | ๐ก | |
|
|
149
|
+
| [no-sensitive-indexeddb](https://eslint.interlace.tools/docs/browser-security/rules/no-sensitive-indexeddb) | CWE-922 | A02:2025 | 7.5 | [no-sensitive-indexeddb](./docs/rules/no-sensitive-indexeddb.md) | ๐ผ | | | ๐ก | |
|
|
150
|
+
| [no-jwt-in-storage](https://eslint.interlace.tools/docs/browser-security/rules/no-jwt-in-storage) | CWE-922 | A02:2025 | 7.5 | [no-jwt-in-storage](./docs/rules/no-jwt-in-storage.md) | ๐ผ | | | ๐ก | |
|
|
151
|
+
| [no-sensitive-cookie-js](https://eslint.interlace.tools/docs/browser-security/rules/no-sensitive-cookie-js) | CWE-1004 | A02:2025 | 5.3 | [no-sensitive-cookie-js](./docs/rules/no-sensitive-cookie-js.md) | ๐ผ | | | ๐ก | |
|
|
152
|
+
| [no-cookie-auth-tokens](https://eslint.interlace.tools/docs/browser-security/rules/no-cookie-auth-tokens) | CWE-1004 | A02:2025 | 5.3 | [no-cookie-auth-tokens](./docs/rules/no-cookie-auth-tokens.md) | ๐ผ | | | ๐ก | |
|
|
153
|
+
| [require-cookie-secure-attrs](https://eslint.interlace.tools/docs/browser-security/rules/require-cookie-secure-attrs) | CWE-614 | A05:2025 | 5.3 | [require-cookie-secure-attrs](./docs/rules/require-cookie-secure-attrs.md) | ๐ผ | | | | ๐ซ |
|
|
154
|
+
| [require-websocket-wss](https://eslint.interlace.tools/docs/browser-security/rules/require-websocket-wss) | CWE-319 | A02:2025 | 7.5 | [require-websocket-wss](./docs/rules/require-websocket-wss.md) | ๐ผ | | | ๐ก | ๐ซ |
|
|
155
|
+
| [no-websocket-innerhtml](https://eslint.interlace.tools/docs/browser-security/rules/no-websocket-innerhtml) | CWE-79 | A03:2025 | 6.1 | [no-websocket-innerhtml](./docs/rules/no-websocket-innerhtml.md) | ๐ผ | | | ๐ก | |
|
|
156
|
+
| [no-websocket-eval](https://eslint.interlace.tools/docs/browser-security/rules/no-websocket-eval) | CWE-95 | A03:2025 | 9.8 | [no-websocket-eval](./docs/rules/no-websocket-eval.md) | ๐ผ | | | ๐ก | |
|
|
157
|
+
| [no-filereader-innerhtml](https://eslint.interlace.tools/docs/browser-security/rules/no-filereader-innerhtml) | CWE-79 | A03:2025 | 6.1 | [no-filereader-innerhtml](./docs/rules/no-filereader-innerhtml.md) | ๐ผ | | | ๐ก | |
|
|
158
|
+
| [require-blob-url-revocation](https://eslint.interlace.tools/docs/browser-security/rules/require-blob-url-revocation) | CWE-401 | A04:2025 | 5.3 | [require-blob-url-revocation](./docs/rules/require-blob-url-revocation.md) | ๐ผ | โ ๏ธ | | ๐ก | |
|
|
159
|
+
| [no-dynamic-service-worker-url](https://eslint.interlace.tools/docs/browser-security/rules/no-dynamic-service-worker-url) | CWE-829 | A08:2025 | 7.5 | [no-dynamic-service-worker-url](./docs/rules/no-dynamic-service-worker-url.md) | ๐ผ | | | ๐ก | |
|
|
160
|
+
| [no-worker-message-innerhtml](https://eslint.interlace.tools/docs/browser-security/rules/no-worker-message-innerhtml) | CWE-79 | A03:2025 | 6.1 | [no-worker-message-innerhtml](./docs/rules/no-worker-message-innerhtml.md) | ๐ผ | | | | |
|
|
161
|
+
| [no-unsafe-inline-csp](https://eslint.interlace.tools/docs/browser-security/rules/no-unsafe-inline-csp) | CWE-79 | A03:2025 | 6.1 | [no-unsafe-inline-csp](./docs/rules/no-unsafe-inline-csp.md) | ๐ผ | | | ๐ก | |
|
|
162
|
+
| [no-unsafe-eval-csp](https://eslint.interlace.tools/docs/browser-security/rules/no-unsafe-eval-csp) | CWE-95 | A03:2025 | 9.8 | [no-unsafe-eval-csp](./docs/rules/no-unsafe-eval-csp.md) | ๐ผ | | | ๐ก | |
|
|
163
|
+
|
|
164
|
+
## ๐ Related ESLint Plugins
|
|
210
165
|
|
|
211
166
|
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
212
167
|
|
|
213
|
-
| Plugin |
|
|
214
|
-
| :--------------------------------------------------------------------------------------------------- |
|
|
215
|
-
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) |
|
|
216
|
-
| [`eslint-plugin-
|
|
217
|
-
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) |
|
|
218
|
-
| [`eslint-plugin-
|
|
219
|
-
| [`eslint-plugin-
|
|
220
|
-
| [`eslint-plugin-
|
|
221
|
-
| [`eslint-plugin-lambda-security`](https://www.npmjs.com/package/eslint-plugin-lambda-security) |
|
|
222
|
-
| [`eslint-plugin-
|
|
223
|
-
| [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) |
|
|
168
|
+
| Plugin | Downloads | Description |
|
|
169
|
+
| :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------- |
|
|
170
|
+
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
|
|
171
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
172
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
173
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
174
|
+
| [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security rules. |
|
|
175
|
+
| [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
|
|
176
|
+
| [`eslint-plugin-lambda-security`](https://www.npmjs.com/package/eslint-plugin-lambda-security) | [](https://www.npmjs.com/package/eslint-plugin-lambda-security) | AWS Lambda security best practices. |
|
|
177
|
+
| [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | [](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | NestJS security rules & patterns. |
|
|
178
|
+
| [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | [](https://www.npmjs.com/package/eslint-plugin-import-next) | Next-gen import sorting & architecture. |
|
|
224
179
|
|
|
225
180
|
## ๐ License
|
|
226
181
|
|
|
227
182
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
183
|
+
|
|
184
|
+
<p align="center">
|
|
185
|
+
<a href="https://eslint.interlace.tools/docs/browser-security"><img src="https://eslint.interlace.tools/images/og-browser-security.png" alt="ESLint Interlace Plugin" width="300" /></a>
|
|
186
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-browser-security",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Security-focused ESLint plugin for browser applications. Detects XSS vulnerabilities, postMessage abuse, localStorage/sessionStorage/IndexedDB token exposure, cookie security issues, WebSocket security, Blob URL leaks, Service Worker risks, and CSP misconfigurations.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|