eslint-plugin-express-security 1.1.0 โ 1.2.0
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 +87 -358
- package/package.json +4 -3
- package/src/index.js +3 -0
- package/src/rules/no-cors-credentials-wildcard/index.d.ts +3 -1
- package/src/rules/no-exposed-debug-endpoints/index.d.ts +14 -0
- package/src/rules/no-exposed-debug-endpoints/index.js +97 -0
- package/src/rules/no-express-unsafe-regex-route/index.d.ts +3 -1
- package/src/rules/no-graphql-introspection-production/index.d.ts +3 -1
- package/src/rules/no-insecure-cookie-options/index.d.ts +3 -1
- package/src/rules/no-permissive-cors/index.d.ts +3 -1
- package/src/rules/require-csrf-protection/index.d.ts +3 -1
- package/src/rules/require-express-body-parser-limits/index.d.ts +3 -1
- package/src/rules/require-helmet/index.d.ts +3 -1
- package/src/rules/require-rate-limiting/index.d.ts +3 -1
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,358 +1,57 @@
|
|
|
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
|
+
Comprehensive security rules for Express.js applications, mapping to OWASP Top 10.
|
|
7
|
+
</p>
|
|
6
8
|
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/eslint-plugin-express-security" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-express-security.svg" alt="NPM Version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/eslint-plugin-express-security" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-express-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=express-security" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=express-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
|
-
[](https://www.npmjs.com/package/eslint-plugin-express-security)
|
|
13
|
-
[](https://opensource.org/licenses/MIT)
|
|
14
|
-
[](https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=express_security)
|
|
15
|
-
[](https://github.com/ofri-peretz/eslint)
|
|
17
|
+
## Description
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
> With **8 security rules** mapped to OWASP Top 10, CWE and CVSS, it transforms your linter into an Express security auditor that AI assistants can understand and fix.
|
|
19
|
+
This plugin offers comprehensive security rules tailored for Express.js applications, directly mapping to the OWASP Top 10 vulnerabilities. It proactively identifies security misconfigurations and unsafe coding patterns, helping you harden your server-side code against common attacks. Implementing these rules is an essential step in building secure, production-ready APIs and web services.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
## Philosophy
|
|
21
22
|
|
|
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.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
- **LLM-optimized & MCP-ready:** Structured 2-line messages with CWE + OWASP + CVSS + concrete fixes so humans _and_ AI auto-fixers stay aligned.
|
|
26
|
-
- **Standards aligned:** OWASP Top 10 Web 2021, CWE tagging, CVSS scoring in every finding for compliance mapping.
|
|
27
|
-
- **Tiered presets:** `recommended`, `strict`, `api`, `graphql` for fast policy rollout.
|
|
28
|
-
- **Middleware-aware:** Detects helmet, cors, csurf, express-rate-limit, body-parser patterns.
|
|
29
|
-
- **Low false positive rate:** Context-aware detection with production heuristics.
|
|
25
|
+
## Getting Started
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/express-security), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/express-security), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/express-security) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
30
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/express-security)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
31
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/express-security), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/express-security)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
33
|
|
|
33
34
|
```bash
|
|
34
|
-
|
|
35
|
-
18:5 error ๐ CWE-942 OWASP:A05 CVSS:9.1 | Permissive CORS with wildcard origin | CRITICAL [SOC2,PCI-DSS]
|
|
36
|
-
Fix: Specify allowed origins: cors({ origin: ['https://your-app.com'] }) | https://owasp.org/...
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Each message includes:**
|
|
40
|
-
|
|
41
|
-
- ๐ **CWE reference** - vulnerability classification
|
|
42
|
-
- ๐ **OWASP category** - Top 10 mapping
|
|
43
|
-
- ๐ **CVSS score** - severity rating (0.0-10.0)
|
|
44
|
-
- ๐ข **Compliance tags** - affected frameworks (SOC2, PCI-DSS, HIPAA)
|
|
45
|
-
- โ
**Fix instruction** - exact code to write
|
|
46
|
-
- ๐ **Documentation link** - learn more
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## ๐ OWASP Top 10 Coverage Matrix
|
|
51
|
-
|
|
52
|
-
| OWASP Category | Coverage | Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
53
|
-
| :---------------------------- | :------: | :--: | :-: | :---- | :--: | :---------: | :-: | :-: | :-: | --- | --- |
|
|
54
|
-
| **A01:2021** Access Control | | | | | | | | | |
|
|
55
|
-
| **A03:2021** Injection | | | | | | | | | |
|
|
56
|
-
| **A05:2021** Misconfiguration | | | | | | | | | |
|
|
57
|
-
| **A07:2021** Auth/Session | | | | | | | | | |
|
|
58
|
-
|
|
59
|
-
> [!TIP]
|
|
60
|
-
> For **complete OWASP coverage**, combine with [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) which provides 78 additional rules covering all OWASP categories.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## ๐ 8 Security Rules
|
|
65
|
-
|
|
66
|
-
๐ผ = Set in `recommended` | โ ๏ธ = Warns in `recommended` | ๐ง = Auto-fixable | ๐ก = Suggestions
|
|
67
|
-
|
|
68
|
-
### Headers & CORS (4 rules)
|
|
69
|
-
|
|
70
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
71
|
-
| :------------------------------------------------------------------------ | :-----: | :---: | :--: | :------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
72
|
-
| [require-helmet](#require-helmet) | CWE-693 | A05 | 7.1 | Require helmet() middleware | ๐ผ | | | | |
|
|
73
|
-
| [no-permissive-cors](#no-permissive-cors) | CWE-942 | A05 | 9.1 | Detect wildcard CORS origins | ๐ผ | | | | |
|
|
74
|
-
| [no-cors-credentials-wildcard](#no-cors-credentials-wildcard) | CWE-942 | A05 | 9.1 | Block credentials: true + origin: "\*" | ๐ผ | | | | |
|
|
75
|
-
| [require-express-body-parser-limits](#require-express-body-parser-limits) | CWE-770 | A05 | 7.5 | Require body parser size limits | | โ ๏ธ | | | |
|
|
76
|
-
|
|
77
|
-
### CSRF & Cookies (2 rules)
|
|
78
|
-
|
|
79
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
80
|
-
| :-------------------------------------------------------- | :-----: | :---: | :--: | :----------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
81
|
-
| [require-csrf-protection](#require-csrf-protection) | CWE-352 | A07 | 8.8 | Require CSRF middleware | | โ ๏ธ | | | |
|
|
82
|
-
| [no-insecure-cookie-options](#no-insecure-cookie-options) | CWE-614 | A07 | 5.3 | Detect missing Secure/HttpOnly | ๐ผ | | | | |
|
|
83
|
-
|
|
84
|
-
### Rate Limiting & DoS (2 rules)
|
|
85
|
-
|
|
86
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
87
|
-
| :-------------------------------------------------------------- | :------: | :---: | :--: | :------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
88
|
-
| [require-rate-limiting](#require-rate-limiting) | CWE-770 | A05 | 7.5 | Require rate limiting middleware | | โ ๏ธ | | | |
|
|
89
|
-
| [no-express-unsafe-regex-route](#no-express-unsafe-regex-route) | CWE-1333 | A03 | 7.5 | Detect ReDoS in route patterns | ๐ผ | | | | |
|
|
90
|
-
|
|
91
|
-
### GraphQL (1 rule)
|
|
92
|
-
|
|
93
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
94
|
-
| :-------------------------------------------------------------------------- | :-----: | :---: | :--: | :------------------------------------ | :-: | :-: | :-: | :-: | :-: |
|
|
95
|
-
| [no-graphql-introspection-production](#no-graphql-introspection-production) | CWE-200 | A01 | 5.3 | Disable GraphQL introspection in prod | | โ ๏ธ | | | |
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## ๐ Rule Details
|
|
100
|
-
|
|
101
|
-
### `require-helmet`
|
|
102
|
-
|
|
103
|
-
Requires helmet() middleware for security headers.
|
|
104
|
-
|
|
105
|
-
**โ Incorrect**
|
|
106
|
-
|
|
107
|
-
```javascript
|
|
108
|
-
const app = express();
|
|
109
|
-
app.get('/', handler); // No helmet middleware
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**โ
Correct**
|
|
113
|
-
|
|
114
|
-
```javascript
|
|
115
|
-
import helmet from 'helmet';
|
|
116
|
-
|
|
117
|
-
const app = express();
|
|
118
|
-
app.use(helmet()); // Adds 11+ security headers
|
|
119
|
-
app.get('/', handler);
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
### `no-permissive-cors`
|
|
125
|
-
|
|
126
|
-
Detects wildcard CORS configuration that allows any origin.
|
|
127
|
-
|
|
128
|
-
**โ Incorrect**
|
|
129
|
-
|
|
130
|
-
```javascript
|
|
131
|
-
app.use(cors({ origin: '*' }));
|
|
132
|
-
app.use(cors()); // Defaults to '*'
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**โ
Correct**
|
|
136
|
-
|
|
137
|
-
```javascript
|
|
138
|
-
app.use(
|
|
139
|
-
cors({
|
|
140
|
-
origin: ['https://your-app.com', 'https://admin.your-app.com'],
|
|
141
|
-
}),
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
// Or use dynamic validation
|
|
145
|
-
app.use(
|
|
146
|
-
cors({
|
|
147
|
-
origin: (origin, callback) => {
|
|
148
|
-
if (allowedOrigins.includes(origin)) {
|
|
149
|
-
callback(null, true);
|
|
150
|
-
} else {
|
|
151
|
-
callback(new Error('Not allowed by CORS'));
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
}),
|
|
155
|
-
);
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
### `no-cors-credentials-wildcard`
|
|
161
|
-
|
|
162
|
-
Blocks the dangerous combination of `credentials: true` with wildcard origins.
|
|
163
|
-
|
|
164
|
-
**โ Incorrect**
|
|
165
|
-
|
|
166
|
-
```javascript
|
|
167
|
-
// CRITICAL: This exposes credentials to any origin!
|
|
168
|
-
app.use(
|
|
169
|
-
cors({
|
|
170
|
-
origin: '*',
|
|
171
|
-
credentials: true,
|
|
172
|
-
}),
|
|
173
|
-
);
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
**โ
Correct**
|
|
177
|
-
|
|
178
|
-
```javascript
|
|
179
|
-
app.use(
|
|
180
|
-
cors({
|
|
181
|
-
origin: 'https://your-app.com',
|
|
182
|
-
credentials: true,
|
|
183
|
-
}),
|
|
184
|
-
);
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
### `require-csrf-protection`
|
|
190
|
-
|
|
191
|
-
Requires CSRF protection middleware for state-changing routes.
|
|
192
|
-
|
|
193
|
-
**โ Incorrect**
|
|
194
|
-
|
|
195
|
-
```javascript
|
|
196
|
-
app.post('/api/transfer', handler); // No CSRF protection
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
**โ
Correct**
|
|
200
|
-
|
|
201
|
-
```javascript
|
|
202
|
-
import csurf from 'csurf';
|
|
203
|
-
|
|
204
|
-
app.use(csurf({ cookie: true }));
|
|
205
|
-
app.post('/api/transfer', handler);
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
### `no-insecure-cookie-options`
|
|
211
|
-
|
|
212
|
-
Detects cookies missing Secure, HttpOnly, or SameSite attributes.
|
|
213
|
-
|
|
214
|
-
**โ Incorrect**
|
|
215
|
-
|
|
216
|
-
```javascript
|
|
217
|
-
res.cookie('session', token); // Missing security attributes
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
**โ
Correct**
|
|
221
|
-
|
|
222
|
-
```javascript
|
|
223
|
-
res.cookie('session', token, {
|
|
224
|
-
httpOnly: true,
|
|
225
|
-
secure: true,
|
|
226
|
-
sameSite: 'strict',
|
|
227
|
-
});
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
### `require-rate-limiting`
|
|
233
|
-
|
|
234
|
-
Requires rate limiting middleware to prevent DoS attacks.
|
|
235
|
-
|
|
236
|
-
**โ Incorrect**
|
|
237
|
-
|
|
238
|
-
```javascript
|
|
239
|
-
app.post('/api/login', handler); // No rate limiting
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
**โ
Correct**
|
|
243
|
-
|
|
244
|
-
```javascript
|
|
245
|
-
import rateLimit from 'express-rate-limit';
|
|
246
|
-
|
|
247
|
-
const limiter = rateLimit({
|
|
248
|
-
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
249
|
-
max: 100, // limit each IP to 100 requests per windowMs
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
app.use('/api/', limiter);
|
|
253
|
-
app.post('/api/login', handler);
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
### `require-express-body-parser-limits`
|
|
259
|
-
|
|
260
|
-
Requires size limits on body parser to prevent DoS via large payloads.
|
|
261
|
-
|
|
262
|
-
**โ Incorrect**
|
|
263
|
-
|
|
264
|
-
```javascript
|
|
265
|
-
app.use(express.json()); // No size limit
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
**โ
Correct**
|
|
269
|
-
|
|
270
|
-
```javascript
|
|
271
|
-
app.use(express.json({ limit: '100kb' }));
|
|
272
|
-
app.use(express.urlencoded({ limit: '100kb', extended: true }));
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
### `no-express-unsafe-regex-route`
|
|
278
|
-
|
|
279
|
-
Detects ReDoS-vulnerable regex patterns in Express routes.
|
|
280
|
-
|
|
281
|
-
**โ Incorrect**
|
|
282
|
-
|
|
283
|
-
```javascript
|
|
284
|
-
// Catastrophic backtracking possible
|
|
285
|
-
app.get('/api/:id(\\d+)+', handler);
|
|
286
|
-
app.get(/^\/user\/(.*)$/, handler);
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
**โ
Correct**
|
|
290
|
-
|
|
291
|
-
```javascript
|
|
292
|
-
app.get('/api/:id(\\d{1,10})', handler); // Bounded
|
|
293
|
-
app.get('/user/:userId', handler); // Named parameter
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
### `no-graphql-introspection-production`
|
|
299
|
-
|
|
300
|
-
Disables GraphQL introspection queries in production.
|
|
301
|
-
|
|
302
|
-
**โ Incorrect**
|
|
303
|
-
|
|
304
|
-
```javascript
|
|
305
|
-
const server = new ApolloServer({
|
|
306
|
-
typeDefs,
|
|
307
|
-
resolvers,
|
|
308
|
-
introspection: true, // Exposes schema in production
|
|
309
|
-
});
|
|
35
|
+
npm install eslint-plugin-express-security --save-dev
|
|
310
36
|
```
|
|
311
37
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
```javascript
|
|
315
|
-
const server = new ApolloServer({
|
|
316
|
-
typeDefs,
|
|
317
|
-
resolvers,
|
|
318
|
-
introspection: process.env.NODE_ENV !== 'production',
|
|
319
|
-
});
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## ๐ Quick Start
|
|
325
|
-
|
|
326
|
-
### ESLint Flat Config (Recommended)
|
|
327
|
-
|
|
328
|
-
```javascript
|
|
329
|
-
// eslint.config.js
|
|
330
|
-
import expressSecurity from 'eslint-plugin-express-security';
|
|
331
|
-
|
|
332
|
-
export default [
|
|
333
|
-
expressSecurity.configs.recommended,
|
|
334
|
-
// ... other configs
|
|
335
|
-
];
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Strict Mode
|
|
339
|
-
|
|
340
|
-
```javascript
|
|
341
|
-
import expressSecurity from 'eslint-plugin-express-security';
|
|
342
|
-
|
|
343
|
-
export default [expressSecurity.configs.strict];
|
|
344
|
-
```
|
|
38
|
+
## โ๏ธ Configuration Presets
|
|
345
39
|
|
|
346
|
-
|
|
40
|
+
| Preset | Description |
|
|
41
|
+
| :------------ | :---------------------------------------------------------------------- |
|
|
42
|
+
| `recommended` | Balanced security for Express projects (critical as error, others warn) |
|
|
43
|
+
| `strict` | Maximum security enforcement (all rules as errors) |
|
|
44
|
+
| `api` | HTTP/API security rules only (CORS, CSRF, cookies, rate limiting) |
|
|
45
|
+
| `graphql` | GraphQL-specific security rules only |
|
|
347
46
|
|
|
348
|
-
##
|
|
47
|
+
## ๐ Supported Libraries
|
|
349
48
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
|
|
|
354
|
-
|
|
|
355
|
-
|
|
|
49
|
+
| Library | npm | Downloads | Detection |
|
|
50
|
+
| :-------- | :---------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :----------------------- |
|
|
51
|
+
| `express` | [](https://www.npmjs.com/package/express) | [](https://www.npmjs.com/package/express) | Misconfig, DoS |
|
|
52
|
+
| `helmet` | [](https://www.npmjs.com/package/helmet) | [](https://www.npmjs.com/package/helmet) | Missing Security Headers |
|
|
53
|
+
| `cors` | [](https://www.npmjs.com/package/cors) | [](https://www.npmjs.com/package/cors) | Permissive CORS |
|
|
54
|
+
| `csurf` | [](https://www.npmjs.com/package/csurf) | [](https://www.npmjs.com/package/csurf) | Missing CSRF Protection |
|
|
356
55
|
|
|
357
56
|
---
|
|
358
57
|
|
|
@@ -382,7 +81,7 @@ export default [
|
|
|
382
81
|
|
|
383
82
|
---
|
|
384
83
|
|
|
385
|
-
##
|
|
84
|
+
## AI-Optimized Messages
|
|
386
85
|
|
|
387
86
|
This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://eslint.org/docs/latest/use/mcp), enabling AI assistants like **Cursor**, **GitHub Copilot**, and **Claude** to:
|
|
388
87
|
|
|
@@ -402,23 +101,7 @@ This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://esl
|
|
|
402
101
|
}
|
|
403
102
|
```
|
|
404
103
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
## ๐ Related ESLint Plugins
|
|
408
|
-
|
|
409
|
-
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
410
|
-
|
|
411
|
-
| Plugin | Downloads | Description | Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
412
|
-
| :--------------------------------------------------------------------------------------------------- | :-------: | :---------: | :--: | :-- | :---: | :--: | :---------: | :-: | :-: | --- | --- | --- |
|
|
413
|
-
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | | | | | | | | | |
|
|
414
|
-
| [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | | | | | | | | | |
|
|
415
|
-
| [`eslint-plugin-lambda-security`](https://www.npmjs.com/package/eslint-plugin-lambda-security) | | | | | | | | | |
|
|
416
|
-
| [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | | | | | | | | | |
|
|
417
|
-
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | | | | | | | | | |
|
|
418
|
-
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | | | | | | | | | |
|
|
419
|
-
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | | | | | | | | | |
|
|
420
|
-
| [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | | | | | | | | | |
|
|
421
|
-
| [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | | | | | | | | | |
|
|
104
|
+
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.
|
|
422
105
|
|
|
423
106
|
---
|
|
424
107
|
|
|
@@ -428,6 +111,52 @@ This plugin runs **100% locally**. No data ever leaves your machine.
|
|
|
428
111
|
|
|
429
112
|
---
|
|
430
113
|
|
|
114
|
+
## Rules
|
|
115
|
+
|
|
116
|
+
**Legend**
|
|
117
|
+
|
|
118
|
+
| Icon | Description |
|
|
119
|
+
| :--: | :----------------------------------------------------------------- |
|
|
120
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
121
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
122
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
123
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
124
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
125
|
+
|
|
126
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
127
|
+
| :------------------------------------------------------------------------------------------------------------------------------------ | :------: | :---: | :--: | :-------------------------------------------------------------------------- | :-: | :-: | :-: | :-: | :-: |
|
|
128
|
+
| [require-helmet](https://eslint.interlace.tools/docs/express-security/rules/require-helmet) | CWE-693 | | 7.1 | [require-helmet](#require-helmet) | ๐ผ | | | | |
|
|
129
|
+
| [no-permissive-cors](https://eslint.interlace.tools/docs/express-security/rules/no-permissive-cors) | CWE-942 | | 9.1 | [no-permissive-cors](#no-permissive-cors) | ๐ผ | | | | |
|
|
130
|
+
| [no-cors-credentials-wildcard](https://eslint.interlace.tools/docs/express-security/rules/no-cors-credentials-wildcard) | CWE-942 | | 9.1 | [no-cors-credentials-wildcard](#no-cors-credentials-wildcard) | ๐ผ | | | | |
|
|
131
|
+
| [require-express-body-parser-limits](https://eslint.interlace.tools/docs/express-security/rules/require-express-body-parser-limits) | CWE-770 | | 7.5 | [require-express-body-parser-limits](#require-express-body-parser-limits) | ๐ผ | โ ๏ธ | | | |
|
|
132
|
+
| [require-csrf-protection](https://eslint.interlace.tools/docs/express-security/rules/require-csrf-protection) | CWE-352 | | 8.8 | [require-csrf-protection](#require-csrf-protection) | ๐ผ | โ ๏ธ | | | |
|
|
133
|
+
| [no-insecure-cookie-options](https://eslint.interlace.tools/docs/express-security/rules/no-insecure-cookie-options) | CWE-614 | | 5.3 | [no-insecure-cookie-options](#no-insecure-cookie-options) | ๐ผ | | | | |
|
|
134
|
+
| [require-rate-limiting](https://eslint.interlace.tools/docs/express-security/rules/require-rate-limiting) | CWE-770 | | 7.5 | [require-rate-limiting](#require-rate-limiting) | ๐ผ | โ ๏ธ | | | |
|
|
135
|
+
| [no-express-unsafe-regex-route](https://eslint.interlace.tools/docs/express-security/rules/no-express-unsafe-regex-route) | CWE-1333 | | 7.5 | [no-express-unsafe-regex-route](#no-express-unsafe-regex-route) | ๐ผ | | | | |
|
|
136
|
+
| [no-graphql-introspection-production](https://eslint.interlace.tools/docs/express-security/rules/no-graphql-introspection-production) | CWE-200 | | 5.3 | [no-graphql-introspection-production](#no-graphql-introspection-production) | ๐ผ | โ ๏ธ | | | |
|
|
137
|
+
|
|
138
|
+
## ๐ Related ESLint Plugins
|
|
139
|
+
|
|
140
|
+
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
141
|
+
|
|
142
|
+
| Plugin | Downloads | Description |
|
|
143
|
+
| :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------ |
|
|
144
|
+
| [`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. |
|
|
145
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
146
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
147
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
148
|
+
| [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
|
|
149
|
+
| [`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. |
|
|
150
|
+
| [`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. |
|
|
151
|
+
| [`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. |
|
|
152
|
+
| [`eslint-plugin-mongodb-security`](https://www.npmjs.com/package/eslint-plugin-mongodb-security) | [](https://www.npmjs.com/package/eslint-plugin-mongodb-security) | MongoDB security best practices. |
|
|
153
|
+
| [`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 hardening. |
|
|
154
|
+
| [`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. |
|
|
155
|
+
|
|
431
156
|
## ๐ License
|
|
432
157
|
|
|
433
158
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
159
|
+
|
|
160
|
+
<p align="center">
|
|
161
|
+
<a href="https://eslint.interlace.tools/docs/express-security"><img src="https://eslint.interlace.tools/images/og-express-security.png" alt="ESLint Interlace Plugin" width="300" /></a>
|
|
162
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-express-security",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Security-focused ESLint plugin for Express.js applications. Detects insecure cookies, missing security headers, CORS misconfigurations, CSRF vulnerabilities, GraphQL security issues, and more.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"eslint",
|
|
42
42
|
"eslint-plugin",
|
|
43
43
|
"eslintplugin",
|
|
44
|
+
"interlace-security",
|
|
44
45
|
"express",
|
|
45
46
|
"expressjs",
|
|
46
47
|
"security",
|
|
@@ -62,8 +63,8 @@
|
|
|
62
63
|
"node": ">=18.0.0"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
66
|
+
"tslib": "^2.3.0",
|
|
67
|
+
"@interlace/eslint-devkit": "^1.2.1"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {},
|
|
69
70
|
"peerDependenciesMeta": {
|
package/src/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const no_graphql_introspection_production_1 = require("./rules/no-graphql-intros
|
|
|
20
20
|
const no_cors_credentials_wildcard_1 = require("./rules/no-cors-credentials-wildcard");
|
|
21
21
|
const require_express_body_parser_limits_1 = require("./rules/require-express-body-parser-limits");
|
|
22
22
|
const no_express_unsafe_regex_route_1 = require("./rules/no-express-unsafe-regex-route");
|
|
23
|
+
const no_exposed_debug_endpoints_1 = require("./rules/no-exposed-debug-endpoints");
|
|
23
24
|
/**
|
|
24
25
|
* Collection of all Express security ESLint rules
|
|
25
26
|
*/
|
|
@@ -38,6 +39,7 @@ exports.rules = {
|
|
|
38
39
|
'no-cors-credentials-wildcard': no_cors_credentials_wildcard_1.noCorsCredentialsWildcard,
|
|
39
40
|
'require-express-body-parser-limits': require_express_body_parser_limits_1.requireExpressBodyParserLimits,
|
|
40
41
|
'no-express-unsafe-regex-route': no_express_unsafe_regex_route_1.noExpressUnsafeRegexRoute,
|
|
42
|
+
'no-exposed-debug-endpoints': no_exposed_debug_endpoints_1.noExposedDebugEndpoints,
|
|
41
43
|
};
|
|
42
44
|
/**
|
|
43
45
|
* ESLint Plugin object
|
|
@@ -67,6 +69,7 @@ const recommendedRules = {
|
|
|
67
69
|
'express-security/no-cors-credentials-wildcard': 'error',
|
|
68
70
|
'express-security/require-express-body-parser-limits': 'warn',
|
|
69
71
|
'express-security/no-express-unsafe-regex-route': 'error',
|
|
72
|
+
'express-security/no-exposed-debug-endpoints': 'error',
|
|
70
73
|
};
|
|
71
74
|
/**
|
|
72
75
|
* Preset configurations for Express security rules
|
|
@@ -20,5 +20,7 @@ export interface Options {
|
|
|
20
20
|
allowInTests?: boolean;
|
|
21
21
|
}
|
|
22
22
|
type RuleOptions = [Options?];
|
|
23
|
-
export declare const noCorsCredentialsWildcard: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
23
|
+
export declare const noCorsCredentialsWildcard: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
24
26
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
+
* MIT license that can be found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
export interface Options {
|
|
7
|
+
endpoints?: string[];
|
|
8
|
+
ignoreFiles?: string[];
|
|
9
|
+
}
|
|
10
|
+
type RuleOptions = [Options?];
|
|
11
|
+
export declare const noExposedDebugEndpoints: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
+
* MIT license that can be found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.noExposedDebugEndpoints = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* @fileoverview Detect debug endpoints without auth in Express applications
|
|
11
|
+
*/
|
|
12
|
+
const eslint_devkit_1 = require("@interlace/eslint-devkit");
|
|
13
|
+
const DEFAULT_DEBUG_PATHS = ['/debug', '/__debug__', '/admin', '/_admin', '/test', '/health'];
|
|
14
|
+
exports.noExposedDebugEndpoints = (0, eslint_devkit_1.createRule)({
|
|
15
|
+
name: 'no-exposed-debug-endpoints',
|
|
16
|
+
meta: {
|
|
17
|
+
type: 'problem',
|
|
18
|
+
docs: {
|
|
19
|
+
description: 'Detect debug endpoints without auth in Express applications',
|
|
20
|
+
},
|
|
21
|
+
messages: {
|
|
22
|
+
violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
|
|
23
|
+
icon: eslint_devkit_1.MessageIcons.SECURITY,
|
|
24
|
+
issueName: 'Exposed Debug Endpoint',
|
|
25
|
+
cwe: 'CWE-489',
|
|
26
|
+
description: 'Debug endpoint exposed without authentication',
|
|
27
|
+
severity: 'HIGH',
|
|
28
|
+
fix: 'Remove debug endpoints from production or add authentication',
|
|
29
|
+
documentationLink: 'https://cwe.mitre.org/data/definitions/489.html',
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
schema: [
|
|
33
|
+
{
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
endpoints: {
|
|
37
|
+
type: 'array',
|
|
38
|
+
items: { type: 'string' },
|
|
39
|
+
description: 'Custom list of debug/admin endpoints to flag'
|
|
40
|
+
},
|
|
41
|
+
ignoreFiles: {
|
|
42
|
+
type: 'array',
|
|
43
|
+
items: { type: 'string' },
|
|
44
|
+
description: 'List of files or patterns to ignore'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
additionalProperties: false
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
defaultOptions: [{}],
|
|
52
|
+
create(context) {
|
|
53
|
+
const options = context.options[0] || {};
|
|
54
|
+
const debugPaths = options.endpoints || DEFAULT_DEBUG_PATHS;
|
|
55
|
+
const ignoreFiles = options.ignoreFiles || [];
|
|
56
|
+
const filename = context.filename;
|
|
57
|
+
// Check if current file should be ignored
|
|
58
|
+
if (ignoreFiles.some(pattern => filename.includes(pattern))) {
|
|
59
|
+
return {};
|
|
60
|
+
}
|
|
61
|
+
function report(node) {
|
|
62
|
+
context.report({ node, messageId: 'violationDetected' });
|
|
63
|
+
}
|
|
64
|
+
const isExpressRouteCall = (node) => {
|
|
65
|
+
return (node.callee.type === 'MemberExpression' &&
|
|
66
|
+
node.callee.object.type === 'Identifier' &&
|
|
67
|
+
['app', 'router', 'express'].includes(node.callee.object.name) &&
|
|
68
|
+
node.callee.property.type === 'Identifier' &&
|
|
69
|
+
['get', 'post', 'use'].includes(node.callee.property.name));
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
CallExpression(node) {
|
|
73
|
+
if (isExpressRouteCall(node)) {
|
|
74
|
+
const pathArg = node.arguments[0];
|
|
75
|
+
if (pathArg && pathArg.type === 'Literal' && typeof pathArg.value === 'string') {
|
|
76
|
+
const path = pathArg.value.toLowerCase();
|
|
77
|
+
if (debugPaths.some(dp => path.includes(dp.toLowerCase()))) {
|
|
78
|
+
report(pathArg);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
Literal(node) {
|
|
84
|
+
if (typeof node.value === 'string') {
|
|
85
|
+
const path = node.value.toLowerCase();
|
|
86
|
+
if (debugPaths.some(dp => path === dp.toLowerCase())) {
|
|
87
|
+
const parent = node.parent;
|
|
88
|
+
if (parent && parent.type === 'CallExpression' && isExpressRouteCall(parent) && parent.arguments[0] === node) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
report(node);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
});
|
|
@@ -21,5 +21,7 @@ export interface Options {
|
|
|
21
21
|
allowInTests?: boolean;
|
|
22
22
|
}
|
|
23
23
|
type RuleOptions = [Options?];
|
|
24
|
-
export declare const noExpressUnsafeRegexRoute: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
24
|
+
export declare const noExpressUnsafeRegexRoute: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
25
27
|
export {};
|
|
@@ -20,5 +20,7 @@ export interface Options {
|
|
|
20
20
|
allowInDevelopment?: boolean;
|
|
21
21
|
}
|
|
22
22
|
type RuleOptions = [Options?];
|
|
23
|
-
export declare const noGraphqlIntrospectionProduction: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
23
|
+
export declare const noGraphqlIntrospectionProduction: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
24
26
|
export {};
|
|
@@ -26,5 +26,7 @@ export interface Options {
|
|
|
26
26
|
acceptableSameSiteValues?: string[];
|
|
27
27
|
}
|
|
28
28
|
type RuleOptions = [Options?];
|
|
29
|
-
export declare const noInsecureCookieOptions: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
29
|
+
export declare const noInsecureCookieOptions: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
30
32
|
export {};
|
|
@@ -22,5 +22,7 @@ export interface Options {
|
|
|
22
22
|
allowedOrigins?: string[];
|
|
23
23
|
}
|
|
24
24
|
type RuleOptions = [Options?];
|
|
25
|
-
export declare const noPermissiveCors: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
25
|
+
export declare const noPermissiveCors: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
26
28
|
export {};
|
|
@@ -22,5 +22,7 @@ export interface Options {
|
|
|
22
22
|
ignorePatterns?: string[];
|
|
23
23
|
}
|
|
24
24
|
type RuleOptions = [Options?];
|
|
25
|
-
export declare const requireCsrfProtection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
25
|
+
export declare const requireCsrfProtection: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
26
28
|
export {};
|
|
@@ -25,5 +25,7 @@ export interface Options {
|
|
|
25
25
|
excessiveLimits?: string[];
|
|
26
26
|
}
|
|
27
27
|
type RuleOptions = [Options?];
|
|
28
|
-
export declare const requireExpressBodyParserLimits: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
28
|
+
export declare const requireExpressBodyParserLimits: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
29
31
|
export {};
|
|
@@ -23,5 +23,7 @@ export interface Options {
|
|
|
23
23
|
assumeHelmetMiddleware?: boolean;
|
|
24
24
|
}
|
|
25
25
|
type RuleOptions = [Options?];
|
|
26
|
-
export declare const requireHelmet: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
26
|
+
export declare const requireHelmet: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
27
29
|
export {};
|
|
@@ -25,5 +25,7 @@ export interface Options {
|
|
|
25
25
|
assumeRateLimiting?: boolean;
|
|
26
26
|
}
|
|
27
27
|
type RuleOptions = [Options?];
|
|
28
|
-
export declare const requireRateLimiting: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener
|
|
28
|
+
export declare const requireRateLimiting: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
29
31
|
export {};
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Ofri Peretz
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|