eslint-plugin-lambda-security 1.0.4 โ 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/LICENSE +21 -0
- package/README.md +100 -248
- package/package.json +3 -12
- package/src/index.d.ts +58 -20
- package/src/index.js +70 -3
- package/src/rules/no-env-logging/index.d.ts +17 -1
- package/src/rules/no-env-logging/index.js +5 -0
- package/src/rules/no-error-swallowing/index.d.ts +24 -0
- package/src/rules/no-error-swallowing/index.js +197 -0
- package/src/rules/no-exposed-error-details/index.d.ts +22 -0
- package/src/rules/no-exposed-error-details/index.js +161 -0
- package/src/rules/no-hardcoded-credentials-sdk/index.d.ts +18 -1
- package/src/rules/no-hardcoded-credentials-sdk/index.js +5 -0
- package/src/rules/no-missing-authorization-check/index.d.ts +24 -0
- package/src/rules/no-missing-authorization-check/index.js +220 -0
- package/src/rules/no-overly-permissive-iam-policy/index.d.ts +22 -0
- package/src/rules/no-overly-permissive-iam-policy/index.js +139 -0
- package/src/rules/no-permissive-cors-middy/index.d.ts +18 -1
- package/src/rules/no-permissive-cors-middy/index.js +5 -0
- package/src/rules/no-permissive-cors-response/index.d.ts +18 -1
- package/src/rules/no-permissive-cors-response/index.js +5 -0
- package/src/rules/no-secrets-in-env/index.d.ts +18 -1
- package/src/rules/no-secrets-in-env/index.js +5 -0
- package/src/rules/no-unbounded-batch-processing/index.d.ts +24 -0
- package/src/rules/no-unbounded-batch-processing/index.js +170 -0
- package/src/rules/no-unvalidated-event-body/index.d.ts +24 -0
- package/src/rules/no-unvalidated-event-body/index.js +270 -0
- package/src/rules/no-user-controlled-requests/index.d.ts +22 -0
- package/src/rules/no-user-controlled-requests/index.js +267 -0
- package/src/rules/require-timeout-handling/index.d.ts +22 -0
- package/src/rules/require-timeout-handling/index.js +171 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,16 +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
|
-
>
|
|
5
|
+
<p align="center">
|
|
6
|
+
Security best practices for AWS Lambda functions (IAM, timeouts, environment).
|
|
7
|
+
</p>
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/eslint-plugin-lambda-security" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-lambda-security.svg" alt="NPM Version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/eslint-plugin-lambda-security" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-lambda-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=lambda-security" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=lambda-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>
|
|
9
16
|
|
|
10
|
-
|
|
11
|
-
> With **5 security rules** mapped to OWASP Serverless Top 10, CWE and CVSS, it transforms your linter into a serverless security auditor that AI assistants can understand and fix.
|
|
17
|
+
## Description
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
This plugin secures your AWS Lambda functions by enforcing best practices related to IAM permissions, timeout configurations, and environment variable management. It proactively detects vulnerabilities such as over-permissive policies and insecure logging practices, helping you adhere to the Principle of Least Privilege. Implementing these checks ensures that your serverless architecture remains resilient and compliant with strict security standards.
|
|
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/lambda-security), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/lambda-security), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/lambda-security) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
30
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/lambda-security)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
31
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/lambda-security), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/lambda-security)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install eslint-plugin-lambda-security --save-dev
|
|
36
|
+
```
|
|
14
37
|
|
|
15
38
|
## ๐ก What you get
|
|
16
39
|
|
|
@@ -38,231 +61,20 @@ src/handlers/api.ts
|
|
|
38
61
|
- โ
**Fix instruction** - exact code to write
|
|
39
62
|
- ๐ **Documentation link** - learn more
|
|
40
63
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## ๐ OWASP Serverless Top 10 Coverage Matrix
|
|
44
|
-
|
|
45
|
-
| OWASP Category | Coverage | Rules |
|
|
46
|
-
| -------------------------------------- | :------: | -------------------------------------------------------------------------------- |
|
|
47
|
-
| **SAS-1: Injection** | ๐ | `no-unvalidated-event-body` (planned) |
|
|
48
|
-
| **SAS-2: Broken Authentication** | โ
| `no-hardcoded-credentials-sdk` |
|
|
49
|
-
| **SAS-3: Sensitive Data Exposure** | โ
| `no-env-logging`, `no-secrets-in-env` |
|
|
50
|
-
| **SAS-4: Security Misconfiguration** | โ
| `no-permissive-cors-*` |
|
|
51
|
-
| **SAS-5: Broken Access Control** | ๐ | Coming soon |
|
|
52
|
-
| **SAS-6: Insufficient Logging** | ๐ | Coming soon |
|
|
53
|
-
| **SAS-7: Denial of Service** | ๐ | Coming soon |
|
|
54
|
-
| **SAS-8: Server-Side Request Forgery** | ๐ | Coming soon |
|
|
55
|
-
| **SAS-9: Functions Misconfiguration** | ๐ | Coming soon |
|
|
56
|
-
| **SAS-10: Improper Crypto** | ๐ | Use [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) |
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## ๐ 5 Security Rules
|
|
61
|
-
|
|
62
|
-
๐ผ = Set in `recommended` | โ ๏ธ = Warns in `recommended` | ๐ง = Auto-fixable | ๐ก = Suggestions
|
|
63
|
-
|
|
64
|
-
### Credential & Secrets Protection (3 rules)
|
|
65
|
-
|
|
66
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก |
|
|
67
|
-
| ------------------------------------------------------------- | ------- | ----- | ---- | ------------------------------------------- | --- | --- | --- | --- |
|
|
68
|
-
| [no-hardcoded-credentials-sdk](#no-hardcoded-credentials-sdk) | CWE-798 | SAS-2 | 9.8 | Hardcoded AWS credentials in SDK v3 clients | ๐ผ | | | |
|
|
69
|
-
| [no-secrets-in-env](#no-secrets-in-env) | CWE-798 | SAS-3 | 9.8 | Secrets hardcoded in environment variables | ๐ผ | | | |
|
|
70
|
-
| [no-env-logging](#no-env-logging) | CWE-532 | SAS-3 | 7.5 | Logging entire `process.env` object | | โ ๏ธ | | |
|
|
71
|
-
|
|
72
|
-
### CORS Security (2 rules)
|
|
73
|
-
|
|
74
|
-
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก |
|
|
75
|
-
| ----------------------------------------------------------- | ------- | ----- | ---- | ---------------------------------------------- | --- | --- | --- | --- |
|
|
76
|
-
| [no-permissive-cors-response](#no-permissive-cors-response) | CWE-942 | SAS-4 | 9.1 | Wildcard CORS in Lambda response headers | ๐ผ | | ๐ง | |
|
|
77
|
-
| [no-permissive-cors-middy](#no-permissive-cors-middy) | CWE-942 | SAS-4 | 9.1 | Permissive CORS in @middy/http-cors middleware | ๐ผ | | | |
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## ๐ Rule Details
|
|
82
|
-
|
|
83
|
-
### `no-hardcoded-credentials-sdk`
|
|
84
|
-
|
|
85
|
-
Detects hardcoded AWS credentials in AWS SDK v3 client configurations.
|
|
86
|
-
|
|
87
|
-
**โ Incorrect**
|
|
88
|
-
|
|
89
|
-
```javascript
|
|
90
|
-
// Hardcoded credentials - NEVER do this!
|
|
91
|
-
const client = new S3Client({
|
|
92
|
-
credentials: {
|
|
93
|
-
accessKeyId: 'AKIAIOSFODNN7EXAMPLE',
|
|
94
|
-
secretAccessKey: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**โ
Correct**
|
|
100
|
-
|
|
101
|
-
```javascript
|
|
102
|
-
// Use credential provider chain
|
|
103
|
-
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
|
|
104
|
-
|
|
105
|
-
const client = new S3Client({
|
|
106
|
-
credentials: fromNodeProviderChain(),
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// Or let SDK use default chain (recommended for Lambda)
|
|
110
|
-
const client = new S3Client({ region: 'us-east-1' });
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Detection Patterns:**
|
|
114
|
-
|
|
115
|
-
- Real AWS access key patterns (AKIA*, ASIA*)
|
|
116
|
-
- Secret access keys with 20+ characters
|
|
117
|
-
- Session tokens with 15+ characters
|
|
118
|
-
- Template literal credential construction
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
### `no-permissive-cors-response`
|
|
123
|
-
|
|
124
|
-
Detects wildcard CORS (`Access-Control-Allow-Origin: '*'`) in Lambda response headers.
|
|
125
|
-
|
|
126
|
-
**โ Incorrect**
|
|
127
|
-
|
|
128
|
-
```javascript
|
|
129
|
-
return {
|
|
130
|
-
statusCode: 200,
|
|
131
|
-
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
132
|
-
body: JSON.stringify(data),
|
|
133
|
-
};
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**โ
Correct**
|
|
137
|
-
|
|
138
|
-
```javascript
|
|
139
|
-
return {
|
|
140
|
-
statusCode: 200,
|
|
141
|
-
headers: { 'Access-Control-Allow-Origin': 'https://your-app.com' },
|
|
142
|
-
body: JSON.stringify(data),
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
// Or use dynamic origin from request
|
|
146
|
-
return {
|
|
147
|
-
statusCode: 200,
|
|
148
|
-
headers: { 'Access-Control-Allow-Origin': event.headers.origin },
|
|
149
|
-
body: JSON.stringify(data),
|
|
150
|
-
};
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
### `no-permissive-cors-middy`
|
|
156
|
-
|
|
157
|
-
Detects permissive CORS configuration in Middy http-cors middleware.
|
|
158
|
-
|
|
159
|
-
**โ Incorrect**
|
|
160
|
-
|
|
161
|
-
```javascript
|
|
162
|
-
// Default is permissive!
|
|
163
|
-
middy(handler).use(httpCors());
|
|
164
|
-
|
|
165
|
-
// Explicit wildcard
|
|
166
|
-
middy(handler).use(httpCors({ origin: '*' }));
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
**โ
Correct**
|
|
170
|
-
|
|
171
|
-
```javascript
|
|
172
|
-
middy(handler).use(
|
|
173
|
-
httpCors({
|
|
174
|
-
origins: ['https://your-app.com', 'https://app.your-domain.com'],
|
|
175
|
-
}),
|
|
176
|
-
);
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
### `no-secrets-in-env`
|
|
182
|
-
|
|
183
|
-
Detects secrets hardcoded in environment variable assignments.
|
|
64
|
+
## โ๏ธ Configuration Presets
|
|
184
65
|
|
|
185
|
-
|
|
66
|
+
| Preset | Description |
|
|
67
|
+
| :------------ | :--------------------------------------------------------------------- |
|
|
68
|
+
| `recommended` | Balanced security for Lambda projects (critical as error, others warn) |
|
|
69
|
+
| `strict` | Maximum security enforcement (all rules as errors) |
|
|
186
70
|
|
|
187
|
-
|
|
188
|
-
process.env.DB_PASSWORD = 'my-secret-password-12345';
|
|
189
|
-
|
|
190
|
-
const envConfig = {
|
|
191
|
-
API_KEY: 'sk-1234567890abcdef1234567890abcdef',
|
|
192
|
-
};
|
|
193
|
-
```
|
|
71
|
+
## ๐ Supported Libraries
|
|
194
72
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
// Use AWS Secrets Manager
|
|
202
|
-
import {
|
|
203
|
-
SecretsManagerClient,
|
|
204
|
-
GetSecretValueCommand,
|
|
205
|
-
} from '@aws-sdk/client-secrets-manager';
|
|
206
|
-
|
|
207
|
-
const secret = await client.send(
|
|
208
|
-
new GetSecretValueCommand({ SecretId: 'my-secret' }),
|
|
209
|
-
);
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
### `no-env-logging`
|
|
215
|
-
|
|
216
|
-
Detects logging of the entire `process.env` object, which may expose secrets.
|
|
217
|
-
|
|
218
|
-
**โ Incorrect**
|
|
219
|
-
|
|
220
|
-
```javascript
|
|
221
|
-
console.log(process.env);
|
|
222
|
-
console.log(JSON.stringify(process.env));
|
|
223
|
-
logger.info(process.env);
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
**โ
Correct**
|
|
227
|
-
|
|
228
|
-
```javascript
|
|
229
|
-
// Log specific, non-sensitive values
|
|
230
|
-
console.log('Region:', process.env.AWS_REGION);
|
|
231
|
-
console.log('Environment:', process.env.NODE_ENV);
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## ๐ Quick Start
|
|
237
|
-
|
|
238
|
-
### ESLint Flat Config (Recommended)
|
|
239
|
-
|
|
240
|
-
```javascript
|
|
241
|
-
// eslint.config.js
|
|
242
|
-
import lambdaSecurity from 'eslint-plugin-lambda-security';
|
|
243
|
-
|
|
244
|
-
export default [
|
|
245
|
-
lambdaSecurity.configs.recommended,
|
|
246
|
-
// ... other configs
|
|
247
|
-
];
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Strict Mode
|
|
251
|
-
|
|
252
|
-
```javascript
|
|
253
|
-
import lambdaSecurity from 'eslint-plugin-lambda-security';
|
|
254
|
-
|
|
255
|
-
export default [lambdaSecurity.configs.strict];
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## ๐ Available Presets
|
|
261
|
-
|
|
262
|
-
| Preset | Description |
|
|
263
|
-
| ----------------- | ---------------------------------------------------------------------- |
|
|
264
|
-
| **`recommended`** | Balanced security for Lambda projects (critical as error, others warn) |
|
|
265
|
-
| **`strict`** | Maximum security enforcement (all rules as errors) |
|
|
73
|
+
| Library | npm | Downloads | Detection |
|
|
74
|
+
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
|
|
75
|
+
| `aws-lambda` | [](https://www.npmjs.com/package/aws-lambda) | [](https://www.npmjs.com/package/aws-lambda) | IAM, Logging, Timeouts |
|
|
76
|
+
| `@aws-sdk/client-lambda` | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | Credential Safety |
|
|
77
|
+
| `middy` | [](https://www.npmjs.com/package/@middy/core) | [](https://www.npmjs.com/package/@middy/core) | Middleware Security |
|
|
266
78
|
|
|
267
79
|
---
|
|
268
80
|
|
|
@@ -306,7 +118,37 @@ export default [
|
|
|
306
118
|
|
|
307
119
|
---
|
|
308
120
|
|
|
309
|
-
##
|
|
121
|
+
## Rules
|
|
122
|
+
|
|
123
|
+
**Legend**
|
|
124
|
+
|
|
125
|
+
| Icon | Description |
|
|
126
|
+
| :--: | :----------------------------------------------------------------- |
|
|
127
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
128
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
129
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
130
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
131
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
132
|
+
|
|
133
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
134
|
+
| :--------------------------------------------------------------------------------------------------------------------------- | :-----: | :----: | :--: | :------------------------------------------------------------------ | :-: | :-: | :-: | :-: | :-: |
|
|
135
|
+
| [no-hardcoded-credentials-sdk](https://eslint.interlace.tools/docs/lambda-security/rules/no-hardcoded-credentials-sdk) | CWE-798 | SAS-02 | 9.8 | [no-hardcoded-credentials-sdk](#no-hardcoded-credentials-sdk) | ๐ผ | | | | |
|
|
136
|
+
| [no-permissive-cors-response](https://eslint.interlace.tools/docs/lambda-security/rules/no-permissive-cors-response) | CWE-942 | SAS-04 | 9.1 | [no-permissive-cors-response](#no-permissive-cors-response) | ๐ผ | | ๐ง | | |
|
|
137
|
+
| [no-permissive-cors-middy](https://eslint.interlace.tools/docs/lambda-security/rules/no-permissive-cors-middy) | CWE-942 | SAS-04 | 9.1 | [no-permissive-cors-middy](#no-permissive-cors-middy) | ๐ผ | | | | |
|
|
138
|
+
| [no-secrets-in-env](https://eslint.interlace.tools/docs/lambda-security/rules/no-secrets-in-env) | CWE-522 | SAS-03 | 9.8 | [no-secrets-in-env](#no-secrets-in-env) | ๐ผ | | | | |
|
|
139
|
+
| [no-env-logging](https://eslint.interlace.tools/docs/lambda-security/rules/no-env-logging) | CWE-532 | SAS-03 | 7.5 | [no-env-logging](#no-env-logging) | ๐ผ | โ ๏ธ | | | |
|
|
140
|
+
| [no-error-swallowing](https://eslint.interlace.tools/docs/lambda-security/rules/no-error-swallowing) | CWE-391 | SAS-06 | 7.5 | [no-error-swallowing](#no-error-swallowing) | ๐ผ | โ ๏ธ | | | |
|
|
141
|
+
| [require-timeout-handling](https://eslint.interlace.tools/docs/lambda-security/rules/require-timeout-handling) | CWE-703 | SAS-07 | 7.5 | [require-timeout-handling](#require-timeout-handling) | ๐ผ | โ ๏ธ | | | |
|
|
142
|
+
| [no-unbounded-batch-processing](https://eslint.interlace.tools/docs/lambda-security/rules/no-unbounded-batch-processing) | CWE-400 | SAS-07 | 7.5 | [no-unbounded-batch-processing](#no-unbounded-batch-processing) | ๐ผ | โ ๏ธ | | | |
|
|
143
|
+
| [no-unvalidated-event-body](https://eslint.interlace.tools/docs/lambda-security/rules/no-unvalidated-event-body) | CWE-20 | SAS-01 | 7.5 | [no-unvalidated-event-body](#no-unvalidated-event-body) | ๐ผ | โ ๏ธ | | | |
|
|
144
|
+
| [no-missing-authorization-check](https://eslint.interlace.tools/docs/lambda-security/rules/no-missing-authorization-check) | CWE-862 | SAS-05 | 7.5 | [no-missing-authorization-check](#no-missing-authorization-check) | ๐ผ | โ ๏ธ | | | |
|
|
145
|
+
| [no-exposed-error-details](https://eslint.interlace.tools/docs/lambda-security/rules/no-exposed-error-details) | CWE-209 | SAS-09 | 7.5 | [no-exposed-error-details](#no-exposed-error-details) | ๐ผ | โ ๏ธ | | | |
|
|
146
|
+
| [no-user-controlled-requests](https://eslint.interlace.tools/docs/lambda-security/rules/no-user-controlled-requests) | CWE-918 | SAS-08 | 9.8 | [no-user-controlled-requests](#no-user-controlled-requests) | ๐ผ | | | | |
|
|
147
|
+
| [no-overly-permissive-iam-policy](https://eslint.interlace.tools/docs/lambda-security/rules/no-overly-permissive-iam-policy) | CWE-732 | SAS-05 | 9.8 | [no-overly-permissive-iam-policy](#no-overly-permissive-iam-policy) | ๐ผ | | | | |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## AI-Optimized Messages
|
|
310
152
|
|
|
311
153
|
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:
|
|
312
154
|
|
|
@@ -314,6 +156,12 @@ This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://esl
|
|
|
314
156
|
- Apply the correct fix using structured guidance
|
|
315
157
|
- Provide educational context to developers
|
|
316
158
|
|
|
159
|
+
```bash
|
|
160
|
+
src/handlers/api.ts
|
|
161
|
+
18:5 error ๐ CWE-798 OWASP:SAS-2 CVSS:9.8 | Hardcoded AWS credentials detected | CRITICAL [SOC2,PCI-DSS]
|
|
162
|
+
Fix: Use credential provider chain or Lambda execution role | https://owasp.org/...
|
|
163
|
+
```
|
|
164
|
+
|
|
317
165
|
```json
|
|
318
166
|
// .cursor/mcp.json
|
|
319
167
|
{
|
|
@@ -326,21 +174,7 @@ This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://esl
|
|
|
326
174
|
}
|
|
327
175
|
```
|
|
328
176
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
## ๐ Related ESLint Plugins
|
|
332
|
-
|
|
333
|
-
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
334
|
-
|
|
335
|
-
| Plugin | Downloads | Description | Rules |
|
|
336
|
-
| ---------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------- | :---: |
|
|
337
|
-
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [](https://npmjs.com/package/eslint-plugin-secure-coding) | Framework-agnostic security (OWASP Web + Mobile Top 10) | 89 |
|
|
338
|
-
| [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [](https://npmjs.com/package/eslint-plugin-express-security) | Express.js security (CORS, cookies, CSRF, helmet) | 8 |
|
|
339
|
-
| [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | [](https://npmjs.com/package/eslint-plugin-nestjs-security) | NestJS security (guards, validation pipes, throttler) | 5 |
|
|
340
|
-
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://npmjs.com/package/eslint-plugin-jwt) | JWT security (algorithm confusion, weak secrets, claims validation) | 13 |
|
|
341
|
-
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://npmjs.com/package/eslint-plugin-crypto) | Cryptographic best practices (weak algorithms, key handling, CVE-specific) | 24 |
|
|
342
|
-
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://npmjs.com/package/eslint-plugin-pg) | PostgreSQL/node-postgres security and best practices | 13 |
|
|
343
|
-
| [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [](https://npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security (OWASP LLM + Agentic Top 10) | 19 |
|
|
177
|
+
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.
|
|
344
178
|
|
|
345
179
|
---
|
|
346
180
|
|
|
@@ -348,8 +182,26 @@ Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with L
|
|
|
348
182
|
|
|
349
183
|
This plugin runs **100% locally**. No data ever leaves your machine.
|
|
350
184
|
|
|
351
|
-
|
|
185
|
+
## ๐ Related ESLint Plugins
|
|
186
|
+
|
|
187
|
+
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
188
|
+
|
|
189
|
+
| Plugin | Downloads | Description |
|
|
190
|
+
| :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------ |
|
|
191
|
+
| [`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. |
|
|
192
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
193
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
194
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
195
|
+
| [`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. |
|
|
196
|
+
| [`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. |
|
|
197
|
+
| [`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. |
|
|
198
|
+
| [`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. |
|
|
199
|
+
| [`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. |
|
|
352
200
|
|
|
353
201
|
## ๐ License
|
|
354
202
|
|
|
355
203
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
204
|
+
|
|
205
|
+
<p align="center">
|
|
206
|
+
<a href="https://eslint.interlace.tools/docs/lambda-security"><img src="https://eslint.interlace.tools/images/og-lambda-security.png" alt="ESLint Interlace Plugin" width="300" /></a>
|
|
207
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-lambda-security",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Security-focused ESLint plugin for AWS Lambda and Middy applications. Detects insecure API Gateway responses, missing security headers, CORS misconfigurations, input validation issues, and more.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -63,9 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@interlace/eslint-devkit": "^1.2.1",
|
|
66
|
-
"tslib": "^2.3.0"
|
|
67
|
-
"vitest": "^4.0.6",
|
|
68
|
-
"@nx/vite": "^22.0.3"
|
|
66
|
+
"tslib": "^2.3.0"
|
|
69
67
|
},
|
|
70
68
|
"peerDependencies": {},
|
|
71
69
|
"peerDependenciesMeta": {
|
|
@@ -85,15 +83,8 @@
|
|
|
85
83
|
"optional": true
|
|
86
84
|
}
|
|
87
85
|
},
|
|
88
|
-
"scripts": {
|
|
89
|
-
"test": "vitest run",
|
|
90
|
-
"test:watch": "vitest watch",
|
|
91
|
-
"test:coverage": "vitest run --coverage"
|
|
92
|
-
},
|
|
93
86
|
"devDependencies": {
|
|
94
87
|
"@typescript-eslint/parser": "^8.46.2",
|
|
95
|
-
"@typescript-eslint/rule-tester": "^8.46.2"
|
|
96
|
-
"@vitest/coverage-v8": "^4.0.6",
|
|
97
|
-
"vitest": "^4.0.6"
|
|
88
|
+
"@typescript-eslint/rule-tester": "^8.46.2"
|
|
98
89
|
}
|
|
99
90
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Detects insecure API Gateway responses, missing security headers,
|
|
6
|
-
* CORS misconfigurations, input validation issues, and more.
|
|
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.
|
|
7
5
|
*/
|
|
8
6
|
declare const _default: {
|
|
9
7
|
rules: {
|
|
10
|
-
'no-hardcoded-credentials-sdk':
|
|
11
|
-
'no-permissive-cors-response':
|
|
12
|
-
'no-permissive-cors-middy':
|
|
13
|
-
'no-secrets-in-env':
|
|
14
|
-
'no-env-logging':
|
|
8
|
+
'no-hardcoded-credentials-sdk': import("@typescript-eslint/utils/ts-eslint").RuleModule<"hardcodedCredentials" | "useCredentialProvider", [import("./rules/no-hardcoded-credentials-sdk").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
9
|
+
'no-permissive-cors-response': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigin", [import("./rules/no-permissive-cors-response").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
10
|
+
'no-permissive-cors-middy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigins", [import("./rules/no-permissive-cors-middy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
11
|
+
'no-secrets-in-env': import("@typescript-eslint/utils/ts-eslint").RuleModule<"secretsInEnv" | "useSecretsManager", [import("./rules/no-secrets-in-env").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
12
|
+
'no-env-logging': import("@typescript-eslint/utils/ts-eslint").RuleModule<"envLogging" | "removeEnvLogging", [import("./rules/no-env-logging").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
13
|
+
'no-unvalidated-event-body': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unvalidatedInput" | "useValidation", [import("./rules/no-unvalidated-event-body").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
14
|
+
'no-missing-authorization-check': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAuthCheck" | "addAuthCheck", [import("./rules/no-missing-authorization-check").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
15
|
+
'no-overly-permissive-iam-policy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissivePolicy" | "useLeastPrivilege", [import("./rules/no-overly-permissive-iam-policy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
16
|
+
'no-error-swallowing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"emptyCatchBlock" | "addErrorLogging", [import("./rules/no-error-swallowing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
17
|
+
'require-timeout-handling': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingTimeoutHandling" | "addTimeoutCheck", [import("./rules/require-timeout-handling").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
18
|
+
'no-unbounded-batch-processing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unboundedBatch" | "addBatchLimit", [import("./rules/no-unbounded-batch-processing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
19
|
+
'no-user-controlled-requests': import("@typescript-eslint/utils/ts-eslint").RuleModule<"ssrfVulnerability" | "useAllowlist", [import("./rules/no-user-controlled-requests").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
20
|
+
'no-exposed-error-details': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exposedErrorDetails" | "sanitizeError", [import("./rules/no-exposed-error-details").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
15
21
|
};
|
|
16
22
|
configs: {
|
|
17
23
|
recommended: {
|
|
@@ -19,11 +25,19 @@ declare const _default: {
|
|
|
19
25
|
plugins: {
|
|
20
26
|
'lambda-security': {
|
|
21
27
|
rules: {
|
|
22
|
-
'no-hardcoded-credentials-sdk':
|
|
23
|
-
'no-permissive-cors-response':
|
|
24
|
-
'no-permissive-cors-middy':
|
|
25
|
-
'no-secrets-in-env':
|
|
26
|
-
'no-env-logging':
|
|
28
|
+
'no-hardcoded-credentials-sdk': import("@typescript-eslint/utils/ts-eslint").RuleModule<"hardcodedCredentials" | "useCredentialProvider", [import("./rules/no-hardcoded-credentials-sdk").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
29
|
+
'no-permissive-cors-response': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigin", [import("./rules/no-permissive-cors-response").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
30
|
+
'no-permissive-cors-middy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigins", [import("./rules/no-permissive-cors-middy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
31
|
+
'no-secrets-in-env': import("@typescript-eslint/utils/ts-eslint").RuleModule<"secretsInEnv" | "useSecretsManager", [import("./rules/no-secrets-in-env").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
32
|
+
'no-env-logging': import("@typescript-eslint/utils/ts-eslint").RuleModule<"envLogging" | "removeEnvLogging", [import("./rules/no-env-logging").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
33
|
+
'no-unvalidated-event-body': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unvalidatedInput" | "useValidation", [import("./rules/no-unvalidated-event-body").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
34
|
+
'no-missing-authorization-check': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAuthCheck" | "addAuthCheck", [import("./rules/no-missing-authorization-check").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
35
|
+
'no-overly-permissive-iam-policy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissivePolicy" | "useLeastPrivilege", [import("./rules/no-overly-permissive-iam-policy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
36
|
+
'no-error-swallowing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"emptyCatchBlock" | "addErrorLogging", [import("./rules/no-error-swallowing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
37
|
+
'require-timeout-handling': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingTimeoutHandling" | "addTimeoutCheck", [import("./rules/require-timeout-handling").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
38
|
+
'no-unbounded-batch-processing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unboundedBatch" | "addBatchLimit", [import("./rules/no-unbounded-batch-processing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
39
|
+
'no-user-controlled-requests': import("@typescript-eslint/utils/ts-eslint").RuleModule<"ssrfVulnerability" | "useAllowlist", [import("./rules/no-user-controlled-requests").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
40
|
+
'no-exposed-error-details': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exposedErrorDetails" | "sanitizeError", [import("./rules/no-exposed-error-details").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
27
41
|
};
|
|
28
42
|
};
|
|
29
43
|
};
|
|
@@ -32,7 +46,15 @@ declare const _default: {
|
|
|
32
46
|
'lambda-security/no-permissive-cors-response': string;
|
|
33
47
|
'lambda-security/no-permissive-cors-middy': string;
|
|
34
48
|
'lambda-security/no-secrets-in-env': string;
|
|
49
|
+
'lambda-security/no-user-controlled-requests': string;
|
|
50
|
+
'lambda-security/no-overly-permissive-iam-policy': string;
|
|
51
|
+
'lambda-security/no-unvalidated-event-body': string;
|
|
52
|
+
'lambda-security/no-missing-authorization-check': string;
|
|
53
|
+
'lambda-security/no-exposed-error-details': string;
|
|
35
54
|
'lambda-security/no-env-logging': string;
|
|
55
|
+
'lambda-security/no-error-swallowing': string;
|
|
56
|
+
'lambda-security/require-timeout-handling': string;
|
|
57
|
+
'lambda-security/no-unbounded-batch-processing': string;
|
|
36
58
|
};
|
|
37
59
|
};
|
|
38
60
|
strict: {
|
|
@@ -40,11 +62,19 @@ declare const _default: {
|
|
|
40
62
|
plugins: {
|
|
41
63
|
'lambda-security': {
|
|
42
64
|
rules: {
|
|
43
|
-
'no-hardcoded-credentials-sdk':
|
|
44
|
-
'no-permissive-cors-response':
|
|
45
|
-
'no-permissive-cors-middy':
|
|
46
|
-
'no-secrets-in-env':
|
|
47
|
-
'no-env-logging':
|
|
65
|
+
'no-hardcoded-credentials-sdk': import("@typescript-eslint/utils/ts-eslint").RuleModule<"hardcodedCredentials" | "useCredentialProvider", [import("./rules/no-hardcoded-credentials-sdk").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
66
|
+
'no-permissive-cors-response': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigin", [import("./rules/no-permissive-cors-response").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
67
|
+
'no-permissive-cors-middy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissiveCors" | "useSpecificOrigins", [import("./rules/no-permissive-cors-middy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
68
|
+
'no-secrets-in-env': import("@typescript-eslint/utils/ts-eslint").RuleModule<"secretsInEnv" | "useSecretsManager", [import("./rules/no-secrets-in-env").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
69
|
+
'no-env-logging': import("@typescript-eslint/utils/ts-eslint").RuleModule<"envLogging" | "removeEnvLogging", [import("./rules/no-env-logging").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
70
|
+
'no-unvalidated-event-body': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unvalidatedInput" | "useValidation", [import("./rules/no-unvalidated-event-body").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
71
|
+
'no-missing-authorization-check': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAuthCheck" | "addAuthCheck", [import("./rules/no-missing-authorization-check").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
72
|
+
'no-overly-permissive-iam-policy': import("@typescript-eslint/utils/ts-eslint").RuleModule<"permissivePolicy" | "useLeastPrivilege", [import("./rules/no-overly-permissive-iam-policy").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
73
|
+
'no-error-swallowing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"emptyCatchBlock" | "addErrorLogging", [import("./rules/no-error-swallowing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
74
|
+
'require-timeout-handling': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingTimeoutHandling" | "addTimeoutCheck", [import("./rules/require-timeout-handling").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
75
|
+
'no-unbounded-batch-processing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unboundedBatch" | "addBatchLimit", [import("./rules/no-unbounded-batch-processing").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
76
|
+
'no-user-controlled-requests': import("@typescript-eslint/utils/ts-eslint").RuleModule<"ssrfVulnerability" | "useAllowlist", [import("./rules/no-user-controlled-requests").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
77
|
+
'no-exposed-error-details': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exposedErrorDetails" | "sanitizeError", [import("./rules/no-exposed-error-details").Options?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
48
78
|
};
|
|
49
79
|
};
|
|
50
80
|
};
|
|
@@ -54,6 +84,14 @@ declare const _default: {
|
|
|
54
84
|
'lambda-security/no-permissive-cors-middy': string;
|
|
55
85
|
'lambda-security/no-secrets-in-env': string;
|
|
56
86
|
'lambda-security/no-env-logging': string;
|
|
87
|
+
'lambda-security/no-unvalidated-event-body': string;
|
|
88
|
+
'lambda-security/no-missing-authorization-check': string;
|
|
89
|
+
'lambda-security/no-overly-permissive-iam-policy': string;
|
|
90
|
+
'lambda-security/no-error-swallowing': string;
|
|
91
|
+
'lambda-security/require-timeout-handling': string;
|
|
92
|
+
'lambda-security/no-unbounded-batch-processing': string;
|
|
93
|
+
'lambda-security/no-user-controlled-requests': string;
|
|
94
|
+
'lambda-security/no-exposed-error-details': string;
|
|
57
95
|
};
|
|
58
96
|
};
|
|
59
97
|
};
|