eslint-plugin-lambda-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.
Files changed (2) hide show
  1. package/README.md +99 -266
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,21 +1,39 @@
1
- # eslint-plugin-lambda-security
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
- <div align="center">
4
- <img src="https://eslint.interlace.tools/images/interlace-hero.png" alt="ESLint Interlace - eslint-plugin-lambda-security" width="100%" />
5
- </div>
5
+ <p align="center">
6
+ Security best practices for AWS Lambda functions (IAM, timeouts, environment).
7
+ </p>
6
8
 
7
- > ๐Ÿ” Security-focused ESLint plugin for AWS Lambda and serverless applications. Detects hardcoded credentials, permissive CORS, environment secrets, and logging issues with AI-optimized fix guidance.
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>
8
16
 
9
- [![npm version](https://img.shields.io/npm/v/eslint-plugin-lambda-security.svg)](https://www.npmjs.com/package/eslint-plugin-lambda-security)
10
- [![npm downloads](https://img.shields.io/npm/dm/eslint-plugin-lambda-security.svg)](https://www.npmjs.com/package/eslint-plugin-lambda-security)
11
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
- [![codecov](https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=lambda_security)](https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=lambda_security)
13
- [![Dec 2025](https://img.shields.io/badge/Dec_2025-blue?logo=rocket&logoColor=white)](https://github.com/ofri-peretz/eslint)
17
+ ## Description
14
18
 
15
- > **Serverless-first security:** This plugin provides security rules for **AWS Lambda**, **Middy.js**, **Serverless Framework**, **AWS SAM**, and **AWS SDK v3**.
16
- > 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.
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.
17
20
 
18
- ---
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
+ ```
19
37
 
20
38
  ## ๐Ÿ’ก What you get
21
39
 
@@ -43,244 +61,20 @@ src/handlers/api.ts
43
61
  - โœ… **Fix instruction** - exact code to write
44
62
  - ๐Ÿ“š **Documentation link** - learn more
45
63
 
46
- ---
47
-
48
- ## ๐Ÿ“Š OWASP Serverless Top 10 Coverage Matrix
49
-
50
- | OWASP Category | Coverage | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
51
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
52
- | **SAS-1: Injection** | | | | | | | | | |
53
- | **SAS-2: Broken Authentication** | | | | | | | | | |
54
- | **SAS-3: Sensitive Data Exposure** | | | | | | | | | |
55
- | **SAS-4: Security Misconfiguration** | | | | | | | | | |
56
- | **SAS-5: Broken Access Control** | | | | | | | | | |
57
- | **SAS-6: Insufficient Logging** | | | | | | | | | |
58
- | **SAS-7: Denial of Service** | | | | | | | | | |
59
- | **SAS-8: Server-Side Request Forgery** | | | | | | | | | |
60
- | **SAS-9: Functions Misconfiguration** | | | | | | | | | |
61
- | **SAS-10: Improper Crypto** | | | | | | | | | |
62
- ---
63
-
64
- ## ๐Ÿ” 13 Security Rules
65
-
66
- ๐Ÿ’ผ = Set in `recommended` | โš ๏ธ = Warns in `recommended` | ๐Ÿ”ง = Auto-fixable | ๐Ÿ’ก = Suggestions
67
-
68
- ### Credential & Secrets Protection (3 rules)
69
-
70
- | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
71
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
72
- | [no-hardcoded-credentials-sdk](#no-hardcoded-credentials-sdk) | CWE-798 | SAS-2 | 9.8 | Hardcoded AWS credentials in SDK v3 clients | ๐Ÿ’ผ | | | | |
73
- | [no-secrets-in-env](#no-secrets-in-env) | CWE-798 | SAS-3 | 9.8 | Secrets hardcoded in environment variables | ๐Ÿ’ผ | | | | |
74
- | [no-env-logging](#no-env-logging) | CWE-532 | SAS-3 | 7.5 | Logging entire `process.env` object | | โš ๏ธ | | | |
75
- ### CORS Security (2 rules)
76
-
77
- | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
78
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
79
- | [no-permissive-cors-response](#no-permissive-cors-response) | CWE-942 | SAS-4 | 9.1 | Wildcard CORS in Lambda response headers | ๐Ÿ’ผ | | ๐Ÿ”ง | | |
80
- | [no-permissive-cors-middy](#no-permissive-cors-middy) | CWE-942 | SAS-4 | 9.1 | Permissive CORS in @middy/http-cors middleware | ๐Ÿ’ผ | | | | |
81
- ### Input Validation & Access Control (4 rules)
82
-
83
- | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
84
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
85
- | no-unvalidated-event-body | CWE-20 | SAS-1 | 8.0 | Lambda handlers using event body without validation | | โš ๏ธ | | ๐Ÿ’ก | |
86
- | no-missing-authorization-check | CWE-862 | SAS-5 | 7.5 | Lambda handlers without authorization checks | | โš ๏ธ | | ๐Ÿ’ก | |
87
- | no-overly-permissive-iam-policy | CWE-732 | SAS-5 | 6.5 | IAM policies with wildcard permissions | ๐Ÿ’ผ | | | ๐Ÿ’ก | |
88
- | no-user-controlled-requests | CWE-918 | SAS-8 | 9.1 | HTTP requests with user-controlled URLs (SSRF) | ๐Ÿ’ผ | | | ๐Ÿ’ก | |
89
- ### Security Operations (4 rules)
90
-
91
- | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
92
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
93
- | no-error-swallowing | CWE-390 | SAS-6 | 5.0 | Empty catch blocks and missing error logging | | โš ๏ธ | | ๐Ÿ’ก | |
94
- | require-timeout-handling | CWE-400 | SAS-7 | 6.0 | External calls without timeout handling | | โš ๏ธ | | ๐Ÿ’ก | |
95
- | no-unbounded-batch-processing | CWE-770 | SAS-7 | 5.5 | Processing batch records without size limits | | โš ๏ธ | | ๐Ÿ’ก | |
96
- | no-exposed-error-details | CWE-209 | SAS-9 | 4.3 | Exposing internal error details in responses | | โš ๏ธ | | ๐Ÿ’ก | |
97
- ---
98
-
99
- ## ๐Ÿ” Rule Details
64
+ ## โš™๏ธ Configuration Presets
100
65
 
101
- ### `no-hardcoded-credentials-sdk`
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) |
102
70
 
103
- Detects hardcoded AWS credentials in AWS SDK v3 client configurations.
71
+ ## ๐Ÿ“š Supported Libraries
104
72
 
105
- **โŒ Incorrect**
106
-
107
- ```javascript
108
- // Hardcoded credentials - NEVER do this!
109
- const client = new S3Client({
110
- credentials: {
111
- accessKeyId: 'AKIAIOSFODNN7EXAMPLE',
112
- secretAccessKey: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
113
- },
114
- });
115
- ```
116
-
117
- **โœ… Correct**
118
-
119
- ```javascript
120
- // Use credential provider chain
121
- import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
122
-
123
- const client = new S3Client({
124
- credentials: fromNodeProviderChain(),
125
- });
126
-
127
- // Or let SDK use default chain (recommended for Lambda)
128
- const client = new S3Client({ region: 'us-east-1' });
129
- ```
130
-
131
- **Detection Patterns:**
132
-
133
- - Real AWS access key patterns (AKIA*, ASIA*)
134
- - Secret access keys with 20+ characters
135
- - Session tokens with 15+ characters
136
- - Template literal credential construction
137
-
138
- ---
139
-
140
- ### `no-permissive-cors-response`
141
-
142
- Detects wildcard CORS (`Access-Control-Allow-Origin: '*'`) in Lambda response headers.
143
-
144
- **โŒ Incorrect**
145
-
146
- ```javascript
147
- return {
148
- statusCode: 200,
149
- headers: { 'Access-Control-Allow-Origin': '*' },
150
- body: JSON.stringify(data),
151
- };
152
- ```
153
-
154
- **โœ… Correct**
155
-
156
- ```javascript
157
- return {
158
- statusCode: 200,
159
- headers: { 'Access-Control-Allow-Origin': 'https://your-app.com' },
160
- body: JSON.stringify(data),
161
- };
162
-
163
- // Or use dynamic origin from request
164
- return {
165
- statusCode: 200,
166
- headers: { 'Access-Control-Allow-Origin': event.headers.origin },
167
- body: JSON.stringify(data),
168
- };
169
- ```
170
-
171
- ---
172
-
173
- ### `no-permissive-cors-middy`
174
-
175
- Detects permissive CORS configuration in Middy http-cors middleware.
176
-
177
- **โŒ Incorrect**
178
-
179
- ```javascript
180
- // Default is permissive!
181
- middy(handler).use(httpCors());
182
-
183
- // Explicit wildcard
184
- middy(handler).use(httpCors({ origin: '*' }));
185
- ```
186
-
187
- **โœ… Correct**
188
-
189
- ```javascript
190
- middy(handler).use(
191
- httpCors({
192
- origins: ['https://your-app.com', 'https://app.your-domain.com'],
193
- }),
194
- );
195
- ```
196
-
197
- ---
198
-
199
- ### `no-secrets-in-env`
200
-
201
- Detects secrets hardcoded in environment variable assignments.
202
-
203
- **โŒ Incorrect**
204
-
205
- ```javascript
206
- process.env.DB_PASSWORD = 'my-secret-password-12345';
207
-
208
- const envConfig = {
209
- API_KEY: 'sk-1234567890abcdef1234567890abcdef',
210
- };
211
- ```
212
-
213
- **โœ… Correct**
214
-
215
- ```javascript
216
- // Read from process.env (populated by Lambda)
217
- const password = process.env.DB_PASSWORD;
218
-
219
- // Use AWS Secrets Manager
220
- import {
221
- SecretsManagerClient,
222
- GetSecretValueCommand,
223
- } from '@aws-sdk/client-secrets-manager';
224
-
225
- const secret = await client.send(
226
- new GetSecretValueCommand({ SecretId: 'my-secret' }),
227
- );
228
- ```
229
-
230
- ---
231
-
232
- ### `no-env-logging`
233
-
234
- Detects logging of the entire `process.env` object, which may expose secrets.
235
-
236
- **โŒ Incorrect**
237
-
238
- ```javascript
239
- console.log(process.env);
240
- console.log(JSON.stringify(process.env));
241
- logger.info(process.env);
242
- ```
243
-
244
- **โœ… Correct**
245
-
246
- ```javascript
247
- // Log specific, non-sensitive values
248
- console.log('Region:', process.env.AWS_REGION);
249
- console.log('Environment:', process.env.NODE_ENV);
250
- ```
251
-
252
- ---
253
-
254
- ## ๐Ÿš€ Quick Start
255
-
256
- ### ESLint Flat Config (Recommended)
257
-
258
- ```javascript
259
- // eslint.config.js
260
- import lambdaSecurity from 'eslint-plugin-lambda-security';
261
-
262
- export default [
263
- lambdaSecurity.configs.recommended,
264
- // ... other configs
265
- ];
266
- ```
267
-
268
- ### Strict Mode
269
-
270
- ```javascript
271
- import lambdaSecurity from 'eslint-plugin-lambda-security';
272
-
273
- export default [lambdaSecurity.configs.strict];
274
- ```
275
-
276
- ---
277
-
278
- ## ๐Ÿ“‹ Available Presets
279
-
280
- | Preset | Description |
281
- | ----------------- | ---------------------------------------------------------------------- |
282
- | **`recommended`** | Balanced security for Lambda projects (critical as error, others warn) |
283
- | **`strict`** | Maximum security enforcement (all rules as errors) |
73
+ | Library | npm | Downloads | Detection |
74
+ | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
75
+ | `aws-lambda` | [![npm](https://img.shields.io/npm/v/aws-lambda.svg?style=flat-square)](https://www.npmjs.com/package/aws-lambda) | [![downloads](https://img.shields.io/npm/dt/aws-lambda.svg?style=flat-square)](https://www.npmjs.com/package/aws-lambda) | IAM, Logging, Timeouts |
76
+ | `@aws-sdk/client-lambda` | [![npm](https://img.shields.io/npm/v/@aws-sdk/client-lambda.svg?style=flat-square)](https://www.npmjs.com/package/@aws-sdk/client-lambda) | [![downloads](https://img.shields.io/npm/dt/@aws-sdk/client-lambda.svg?style=flat-square)](https://www.npmjs.com/package/@aws-sdk/client-lambda) | Credential Safety |
77
+ | `middy` | [![npm](https://img.shields.io/npm/v/@middy/core.svg?style=flat-square)](https://www.npmjs.com/package/@middy/core) | [![downloads](https://img.shields.io/npm/dt/@middy/core.svg?style=flat-square)](https://www.npmjs.com/package/@middy/core) | Middleware Security |
284
78
 
285
79
  ---
286
80
 
@@ -324,7 +118,37 @@ export default [
324
118
 
325
119
  ---
326
120
 
327
- ## ๐Ÿค– LLM & AI Integration
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
328
152
 
329
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:
330
154
 
@@ -332,6 +156,12 @@ This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://esl
332
156
  - Apply the correct fix using structured guidance
333
157
  - Provide educational context to developers
334
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
+
335
165
  ```json
336
166
  // .cursor/mcp.json
337
167
  {
@@ -344,31 +174,34 @@ This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://esl
344
174
  }
345
175
  ```
346
176
 
347
- ---
348
-
349
- ## ๐Ÿ”— Related ESLint Plugins
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.
350
178
 
351
- Part of the **Interlace ESLint Ecosystem** โ€” AI-native security plugins with LLM-optimized error messages:
352
-
353
- | Plugin | Downloads | Description | Rule | CWE | OWASP | CVSS | Description | ๐Ÿ’ผ | โš ๏ธ | ๐Ÿ”ง | ๐Ÿ’ก | ๐Ÿšซ |
354
- | :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
355
- | [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | | | | | | | | | |
356
- | [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | | | | | | | | | |
357
- | [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | | | | | | | | | |
358
- | [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | | | | | | | | | |
359
- | [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | | | | | | | | | |
360
- | [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | | | | | | | | | |
361
- | [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | | | | | | | | | |
362
- | [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | | | | | | | | | |
363
- | [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | | | | | | | | | |
364
179
  ---
365
180
 
366
181
  ## ๐Ÿ”’ Privacy
367
182
 
368
183
  This plugin runs **100% locally**. No data ever leaves your machine.
369
184
 
370
- ---
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) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-secure-coding.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
192
+ | [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-pg.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
193
+ | [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-crypto.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
194
+ | [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-jwt.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
195
+ | [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-browser-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
196
+ | [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-vercel-ai-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security rules. |
197
+ | [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-express-security.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
198
+ | [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-nestjs-security.svg?style=flat-square)](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) | [![downloads](https://img.shields.io/npm/dt/eslint-plugin-import-next.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-import-next) | Next-gen import sorting & architecture. |
371
200
 
372
201
  ## ๐Ÿ“„ License
373
202
 
374
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.1.0",
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",