eslint-plugin-lambda-security 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +106 -0
- package/CHANGELOG.md +163 -0
- package/README.md +72 -51
- package/package.json +21 -5
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/oxlint.d.ts +20 -0
- package/src/oxlint.js +21 -0
- package/src/rules/no-env-logging/index.js +6 -3
- package/src/rules/no-error-swallowing/index.js +19 -55
- package/src/rules/no-exposed-debug-endpoints/index.js +3 -0
- package/src/rules/no-exposed-error-details/index.js +7 -4
- package/src/rules/no-hardcoded-credentials-sdk/index.js +7 -4
- package/src/rules/no-missing-authorization-check/index.js +17 -8
- package/src/rules/no-overly-permissive-iam-policy/index.js +9 -6
- package/src/rules/no-permissive-cors-middy/index.js +4 -1
- package/src/rules/no-permissive-cors-response/index.js +5 -1
- package/src/rules/no-secrets-in-env/index.js +4 -1
- package/src/rules/no-unbounded-batch-processing/index.js +23 -9
- package/src/rules/no-unvalidated-event-body/index.js +109 -16
- package/src/rules/no-user-controlled-requests/index.js +15 -12
- package/src/rules/require-timeout-handling/index.js +19 -10
package/AGENTS.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
> Context for AI coding agents working on eslint-plugin-lambda-security
|
|
4
|
+
|
|
5
|
+
## Setup Commands
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Install dependencies (from monorepo root)
|
|
9
|
+
npm install
|
|
10
|
+
|
|
11
|
+
# Build this package
|
|
12
|
+
nx build eslint-plugin-lambda-security
|
|
13
|
+
|
|
14
|
+
# Run tests
|
|
15
|
+
nx test eslint-plugin-lambda-security
|
|
16
|
+
|
|
17
|
+
# Run tests with coverage
|
|
18
|
+
nx test eslint-plugin-lambda-security --coverage
|
|
19
|
+
|
|
20
|
+
# Lint this package
|
|
21
|
+
nx lint eslint-plugin-lambda-security
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Code Style
|
|
25
|
+
|
|
26
|
+
- TypeScript strict mode with `@interlace/eslint-devkit` types
|
|
27
|
+
- Use `AST_NODE_TYPES` constants, never string literals for node types
|
|
28
|
+
- Use `formatLLMMessage()` for all rule error messages
|
|
29
|
+
- Include CWE, CVSS, OWASP Serverless Top 10 in every security message
|
|
30
|
+
- Use `c8 ignore` comments with documented reasons for untestable code
|
|
31
|
+
- Single-pass AST traversal patterns (O(n) complexity)
|
|
32
|
+
|
|
33
|
+
## Testing Instructions
|
|
34
|
+
|
|
35
|
+
- Tests use `@typescript-eslint/rule-tester` with Vitest
|
|
36
|
+
- Each rule has `index.ts` (implementation) and `*.test.ts` (tests) in same directory
|
|
37
|
+
- Run specific rule test: `nx test eslint-plugin-lambda-security --testPathPattern="no-hardcoded-credentials"`
|
|
38
|
+
- Coverage target: ≥90% lines, ≥95% functions
|
|
39
|
+
- All tests must pass before committing
|
|
40
|
+
|
|
41
|
+
## Project Structure
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
src/
|
|
45
|
+
├── index.ts # Plugin entry, exports rules and 2 configs
|
|
46
|
+
├── types/index.ts # Exported rule option types
|
|
47
|
+
└── rules/ # 5 rule directories
|
|
48
|
+
└── [rule-name]/
|
|
49
|
+
├── index.ts # Rule implementation
|
|
50
|
+
└── *.test.ts # Rule tests
|
|
51
|
+
docs/rules/ # Markdown documentation per rule
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Plugin Purpose
|
|
55
|
+
|
|
56
|
+
Security-focused ESLint plugin with **5 rules** for AWS Lambda, Middy, and serverless applications. Covers hardcoded credentials, secrets exposure, environment logging, and CORS misconfigurations.
|
|
57
|
+
|
|
58
|
+
## Rule Categories
|
|
59
|
+
|
|
60
|
+
| Category | Rules | CWEs |
|
|
61
|
+
| --------------------- | --------------------------------------------------------------------- | -------- |
|
|
62
|
+
| Credentials & Secrets | `no-hardcoded-credentials-sdk`, `no-secrets-in-env`, `no-env-logging` | 532, 798 |
|
|
63
|
+
| CORS | `no-permissive-cors-response`, `no-permissive-cors-middy` | 942 |
|
|
64
|
+
|
|
65
|
+
## AWS SDK Clients Detected
|
|
66
|
+
|
|
67
|
+
S3Client, DynamoDBClient, LambdaClient, STSClient, SecretsManagerClient, SQSClient, SNSClient, EC2Client, ECSClient, CloudWatchClient, CloudWatchLogsClient, APIGatewayClient, CognitoIdentityClient, CognitoIdentityProviderClient, EventBridgeClient, StepFunctionsClient, RDSClient, ElastiCacheClient
|
|
68
|
+
|
|
69
|
+
## AWS Access Key Patterns
|
|
70
|
+
|
|
71
|
+
| Pattern | Type |
|
|
72
|
+
| ------- | ------------------------ |
|
|
73
|
+
| `AKIA*` | IAM user access key |
|
|
74
|
+
| `ASIA*` | STS temporary access key |
|
|
75
|
+
| `AIDA*` | IAM user ID |
|
|
76
|
+
|
|
77
|
+
## Common Fix Patterns
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
// Hardcoded credentials
|
|
81
|
+
// BAD: new S3Client({ credentials: { accessKeyId: 'AKIA...', secretAccessKey: '...' } })
|
|
82
|
+
// GOOD: new S3Client({ region: 'us-east-1' }) // Uses Lambda execution role
|
|
83
|
+
// GOOD: new S3Client({ credentials: fromNodeProviderChain() })
|
|
84
|
+
|
|
85
|
+
// Secrets in env
|
|
86
|
+
// BAD: process.env.DB_PASSWORD = 'my-secret'
|
|
87
|
+
// GOOD: const secret = await client.send(new GetSecretValueCommand({ SecretId: 'my-secret' }))
|
|
88
|
+
|
|
89
|
+
// Logging env
|
|
90
|
+
// BAD: console.log(process.env)
|
|
91
|
+
// GOOD: console.log('Region:', process.env.AWS_REGION)
|
|
92
|
+
|
|
93
|
+
// Lambda CORS
|
|
94
|
+
// BAD: return { headers: { 'Access-Control-Allow-Origin': '*' }, ... }
|
|
95
|
+
// GOOD: return { headers: { 'Access-Control-Allow-Origin': 'https://your-app.com' }, ... }
|
|
96
|
+
|
|
97
|
+
// Middy CORS
|
|
98
|
+
// BAD: middy(handler).use(httpCors())
|
|
99
|
+
// GOOD: middy(handler).use(httpCors({ origins: ['https://your-app.com'] }))
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Security Considerations
|
|
103
|
+
|
|
104
|
+
- All rules map to OWASP Serverless Top 10: SAS-2, SAS-3, SAS-4
|
|
105
|
+
- CWE coverage: 532, 798, 942
|
|
106
|
+
- Real AWS key pattern detection (not just string length checks)
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
## [1.2.3] - 2026-02-08
|
|
2
|
+
|
|
3
|
+
## 1.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#220](https://github.com/ofri-peretz/eslint/pull/220) [`ad8416d`](https://github.com/ofri-peretz/eslint/commit/ad8416d4db196bf0b24942ddabbfaefb0cae7bab) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Fix runtime crashes when linting realistic AWS Lambda handlers under ESLint 9.
|
|
8
|
+
|
|
9
|
+
The published `1.2.3` tarball was a **stale build**: its rules still threw on the
|
|
10
|
+
generated lambda-ai-corpus handlers, even though source had already been fixed.
|
|
11
|
+
This republishes the corrected build and locks it with a regression test.
|
|
12
|
+
- **`no-error-swallowing`** no longer throws `RangeError: Maximum call stack size
|
|
13
|
+
exceeded`. The old build walked the catch-block AST by hand and recursed through
|
|
14
|
+
the cyclic `node.parent` reference; source now uses `sourceCode.getText()` + a
|
|
15
|
+
regex.
|
|
16
|
+
- **`require-timeout-handling`**, **`no-missing-authorization-check`**, and
|
|
17
|
+
**`no-unbounded-batch-processing`** no longer throw `Error: Unknown class name:
|
|
18
|
+
exit`. They used a grouped `:exit` selector (`'A:exit, B:exit, C:exit'`); ESLint
|
|
19
|
+
only strips the trailing `:exit`, so esquery received a bare `:exit`. Source now
|
|
20
|
+
uses one listener key per node type.
|
|
21
|
+
- `plugin.meta.version` is now read from `package.json` instead of a hardcoded
|
|
22
|
+
string, so a build can no longer mislabel its own version (1.2.3 embedded
|
|
23
|
+
`1.1.0`).
|
|
24
|
+
|
|
25
|
+
- [#213](https://github.com/ofri-peretz/eslint/pull/213) [`391dbe6`](https://github.com/ofri-peretz/eslint/commit/391dbe6b39f78d549379218567cb959649f8c614) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Align every security rule's `meta.docs.cvss` to the CVSS its finding actually
|
|
26
|
+
emits. The emitted machine-readable message sources its `CVSS:x` from
|
|
27
|
+
`CWE_MAPPING` via `formatLLMMessage` → `enrichFromCWE`, but the static
|
|
28
|
+
`meta.docs.cvss` documentation field had drifted on 45 rules across these 7
|
|
29
|
+
plugins — e.g. `no-hardcoded-credentials` documented `9.5` while emitting
|
|
30
|
+
`CVSS:9.8` (the value the published article and SARIF/LLM consumers already
|
|
31
|
+
read).
|
|
32
|
+
|
|
33
|
+
This corrects the **documentation metadata only** — no emitted finding changes.
|
|
34
|
+
Locked by `security-cvss-docs-consistency.lock.test.ts` (cross-plugin: every
|
|
35
|
+
security rule's `meta.docs.cvss` must equal the CVSS it emits), the
|
|
36
|
+
`no-hardcoded-credentials` rule lock (real ESLint `Linter` emission), and a
|
|
37
|
+
devkit `enrichFromCWE` contract test pinning `CWE-798 → 9.8`.
|
|
38
|
+
|
|
39
|
+
Follow-up (not in scope): 50 security rules document a CVSS that never appears
|
|
40
|
+
in any emitted message (their messages carry no CWE), and several rules emit the
|
|
41
|
+
generic CWE score where a rule-specific score may be warranted — both change
|
|
42
|
+
emitted output and are separate decisions.
|
|
43
|
+
|
|
44
|
+
## 1.2.4
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- [#144](https://github.com/ofri-peretz/eslint/pull/144) [`8843ce7`](https://github.com/ofri-peretz/eslint/commit/8843ce7fbb465caad161b97032467b3a37a49319) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - fix: ILB-Wild FP reduction + doc examples + doc-test-alignment scanner fixes
|
|
49
|
+
|
|
50
|
+
**`no-unlimited-resource-allocation` — FP reduction (430 Edge FPs)**
|
|
51
|
+
- Skip loop-allocation reporting when the first argument is a numeric literal (e.g. `Buffer.alloc(1024)` inside a loop is statically bounded, not a risk)
|
|
52
|
+
- Skip `Array.isArray`, `Array.from`, `Array.of` calls in the `alloc/Array` pattern check (these don't allocate unbounded memory)
|
|
53
|
+
|
|
54
|
+
**`no-hardcoded-credentials` — FP reduction (~280 Edge FPs)**
|
|
55
|
+
- Extended test-file skip to cover `.fixture.`, `.mock.`, `__mocks__/`, `/tests/`, `/fixtures/`, `/mocks/` paths
|
|
56
|
+
- Skip string literals that are fallback values in `process.env.X || 'fallback'` expressions — the secret lives in the environment, the string is only a dev-mode default
|
|
57
|
+
|
|
58
|
+
**Doc examples — 4 rules now have ❌ Incorrect examples**
|
|
59
|
+
- `lambda-security/no-missing-authorization-check`
|
|
60
|
+
- `lambda-security/no-overly-permissive-iam-policy`
|
|
61
|
+
- `node-security/prefer-native-crypto` (renamed non-standard `### ❌ Third-Party (Flagged)` to `### ❌ Incorrect`)
|
|
62
|
+
- `vercel-ai-security/require-tool-confirmation` (replaced placeholder with a real tested example)
|
|
63
|
+
|
|
64
|
+
**`ilb-doc-test-alignment` scanner fixes**
|
|
65
|
+
- Accept both `## ❌` and `### ❌` headings (docs use H3 under an H2 `## Examples` section; was only finding H2)
|
|
66
|
+
- Slice from end-of-line rather than end-of-regex-match (prevents `## ❌ Incorrect Code` from leaving a partial heading in the parsed section)
|
|
67
|
+
|
|
68
|
+
Result: `ilb:doc-test-alignment` → 206 ok, 0 doc has no ❌ examples (was 165 missing).
|
|
69
|
+
|
|
70
|
+
- [#194](https://github.com/ofri-peretz/eslint/pull/194) [`55d5c0a`](https://github.com/ofri-peretz/eslint/commit/55d5c0ab90bfaaecf01be5146a91a2e4b14e1d41) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Fix a hard crash (`Error: Unknown class name: exit`) that aborted the entire ESLint run on ESLint 9 whenever the `recommended` or `strict` config was enabled.
|
|
71
|
+
|
|
72
|
+
Three rules — `require-timeout-handling`, `no-missing-authorization-check`, and `no-unbounded-batch-processing` — registered their function-exit listener as a single comma-joined selector key:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
'ArrowFunctionExpression:exit, FunctionExpression:exit, FunctionDeclaration:exit'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
ESLint only strips a **trailing** `:exit` before handing a selector to esquery, so the earlier `:exit` tokens survived into the parser and threw `Unknown class name: exit` for every linted file. Each listener is now registered as one key per node type, which is the only esquery-safe form.
|
|
79
|
+
|
|
80
|
+
A config-level regression test (`src/index.test.ts`) now boots the real ESLint engine against both shipped configs, so any future comma-joined `:exit` — or any other unparseable selector in any rule — fails in CI instead of in a consumer's editor.
|
|
81
|
+
|
|
82
|
+
`@interlace/eslint-config` re-exports the `recommended` config and is republished against the fixed plugin.
|
|
83
|
+
|
|
84
|
+
- [#143](https://github.com/ofri-peretz/eslint/pull/143) [`213cde1`](https://github.com/ofri-peretz/eslint/commit/213cde190ff2aea49ca7c1b533170940f879d9b4) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - fix(no-missing-null-checks): eliminate 53 false positives via three new narrowing patterns
|
|
85
|
+
|
|
86
|
+
Rules that were recognized as null guards are now correctly identified as safe:
|
|
87
|
+
1. **Truthy if guard** — `if (obj) { obj.prop }` — direct truthy check proves non-null. Also covers chains: `if (response)` protects `response.data.items`.
|
|
88
|
+
2. **Short-circuit AND** — `obj && obj.prop` — right side of `&&` only runs when left is truthy.
|
|
89
|
+
3. **Ternary consequent** — `obj ? obj.prop : fallback` — truthy test guards the consequent.
|
|
90
|
+
|
|
91
|
+
Also: bumped `beforeAll` timeout to 30 seconds in 7 compatibility test files (`__compatibility__/*.spec.ts`). Native-addon packages routinely exceed the previous 10-second default on a cold ESM load.
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [[`736a5fe`](https://github.com/ofri-peretz/eslint/commit/736a5fed47e673f6157ea900b29fe2a54e4bc7df)]:
|
|
94
|
+
- @interlace/eslint-devkit@1.4.1
|
|
95
|
+
|
|
96
|
+
### Bug Fixes
|
|
97
|
+
|
|
98
|
+
- align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
|
|
99
|
+
|
|
100
|
+
### Documentation
|
|
101
|
+
|
|
102
|
+
- fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
|
|
103
|
+
|
|
104
|
+
### ❤️ Thank You
|
|
105
|
+
|
|
106
|
+
- Ofri Peretz
|
|
107
|
+
|
|
108
|
+
## [1.2.2] - 2026-02-06
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
- align codecov component names and update docs components ([0a59a86c](https://github.com/ofri-peretz/eslint/commit/0a59a86c))
|
|
113
|
+
|
|
114
|
+
### ❤️ Thank You
|
|
115
|
+
|
|
116
|
+
- Ofri Peretz
|
|
117
|
+
|
|
118
|
+
## [1.2.1] - 2026-02-02
|
|
119
|
+
|
|
120
|
+
This was a version bump only for eslint-plugin-lambda-security to align it with other projects, there were no code changes.
|
|
121
|
+
|
|
122
|
+
# Changelog
|
|
123
|
+
|
|
124
|
+
All notable changes to `eslint-plugin-lambda-security` will be documented in this file.
|
|
125
|
+
|
|
126
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
127
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
128
|
+
|
|
129
|
+
## [1.0.0] - 2025-12-29
|
|
130
|
+
|
|
131
|
+
### Added
|
|
132
|
+
|
|
133
|
+
#### Credential & Secrets Protection Rules (3)
|
|
134
|
+
|
|
135
|
+
- `no-hardcoded-credentials-sdk` - Detect hardcoded AWS credentials in SDK v3 clients (CWE-798)
|
|
136
|
+
- `no-secrets-in-env` - Detect secrets hardcoded in environment variables (CWE-798)
|
|
137
|
+
- `no-env-logging` - Detect logging entire process.env object (CWE-532)
|
|
138
|
+
|
|
139
|
+
#### CORS Security Rules (2)
|
|
140
|
+
|
|
141
|
+
- `no-permissive-cors-response` - Detect wildcard CORS in Lambda response headers (CWE-942)
|
|
142
|
+
- `no-permissive-cors-middy` - Detect permissive CORS in @middy/http-cors middleware (CWE-942)
|
|
143
|
+
|
|
144
|
+
#### Presets (2)
|
|
145
|
+
|
|
146
|
+
- `recommended` - Balanced security defaults
|
|
147
|
+
- `strict` - All 5 rules as errors
|
|
148
|
+
|
|
149
|
+
#### Features
|
|
150
|
+
|
|
151
|
+
- LLM-optimized error messages with CWE references
|
|
152
|
+
- OWASP Serverless Top 10 alignment (SAS-2, SAS-3, SAS-4)
|
|
153
|
+
- AWS SDK v3 client detection (S3, DynamoDB, Lambda, STS, etc.)
|
|
154
|
+
- Middy middleware detection (@middy/http-cors)
|
|
155
|
+
- Real AWS access key pattern matching (AKIA*, ASIA*)
|
|
156
|
+
- TypeScript support with exported option types
|
|
157
|
+
- Comprehensive test coverage (78 tests, 97.40% line coverage)
|
|
158
|
+
- Auto-fix for CORS violations
|
|
159
|
+
|
|
160
|
+
### Security
|
|
161
|
+
|
|
162
|
+
- Covers 3 CWEs: 532, 798, 942
|
|
163
|
+
- Maps to OWASP Serverless Top 10: SAS-2, SAS-3, SAS-4
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://eslint.interlace.tools" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
2
|
+
<a href="https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
<a href="https://www.npmjs.com/package/eslint-plugin-lambda-security" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-lambda-security.svg" alt="NPM Version" /></a>
|
|
11
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
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=
|
|
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
14
|
<a href="https://github.com/ofri-peretz/eslint" target="_blank"><img src="https://img.shields.io/badge/Since-Dec_2025-blue?logo=rocket&logoColor=white" alt="Since Dec 2025" /></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
> ⭐ If this plugin caught a real bug for you, [**star the repo**](https://github.com/ofri-peretz/eslint) — it's the signal that keeps these rules maintained.
|
|
18
|
+
|
|
17
19
|
## Description
|
|
18
20
|
|
|
19
21
|
This plugin provides Security best practices for AWS Lambda functions (IAM, timeouts, environment).
|
|
20
|
-
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
|
|
21
22
|
|
|
22
23
|
## Philosophy
|
|
23
24
|
|
|
@@ -25,25 +26,31 @@ By using this plugin, you can proactively identify and mitigate security risks a
|
|
|
25
26
|
|
|
26
27
|
## Getting Started
|
|
27
28
|
|
|
28
|
-
- To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-lambda-security), visit [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
29
|
-
- 要查看中文 [指南](https://eslint.interlace.tools/docs/security/plugin-lambda-security), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
30
|
-
- [가이드](https://eslint.interlace.tools/docs/security/plugin-lambda-security) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools)에서 확인하실 수 있습니다. 📚
|
|
31
|
-
- [ガイド](https://eslint.interlace.tools/docs/security/plugin-lambda-security)は [eslint.interlace.tools](https://eslint.interlace.tools)でご確認ください。 📚
|
|
32
|
-
- Para ver la [guía](https://eslint.interlace.tools/docs/security/plugin-lambda-security), visita [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
33
|
-
- للاطلاع على [الدليل](https://eslint.interlace.tools/docs/security/plugin-lambda-security)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
29
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security). 📚
|
|
30
|
+
- 要查看中文 [指南](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security). 📚
|
|
31
|
+
- [가이드](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security)에서 확인하실 수 있습니다. 📚
|
|
32
|
+
- [ガイド](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security)は [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security)でご確認ください。 📚
|
|
33
|
+
- Para ver la [guía](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security), visita [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security). 📚
|
|
34
|
+
- للاطلاع على [الدليل](https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security). 📚
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
37
|
npm install eslint-plugin-lambda-security --save-dev
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **Framework-aware:** Detects Middy middleware, API Gateway response patterns, AWS SDK v3 clients.
|
|
45
|
-
- **Low false positive rate:** Context-aware detection with production heuristics.
|
|
40
|
+
## ⚙️ Configuration Presets
|
|
41
|
+
| Preset | Description |
|
|
42
|
+
| :------------ | :--------------------------------------------------------------------- |
|
|
43
|
+
| `recommended` | Balanced security for Lambda projects (critical as error, others warn) |
|
|
44
|
+
| `strict` | Maximum security enforcement (all rules as errors) |
|
|
46
45
|
|
|
46
|
+
## 📚 Supported Libraries
|
|
47
|
+
| Library | npm | Downloads | Detection |
|
|
48
|
+
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
|
|
49
|
+
| `aws-lambda` | [](https://www.npmjs.com/package/aws-lambda) | [](https://www.npmjs.com/package/aws-lambda) | IAM, Logging, Timeouts |
|
|
50
|
+
| `@aws-sdk/client-lambda` | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | Credential Safety |
|
|
51
|
+
| `middy` | [](https://www.npmjs.com/package/@middy/core) | [](https://www.npmjs.com/package/@middy/core) | Middleware Security |
|
|
52
|
+
|
|
53
|
+
## 🤖 AI-Optimized Messages
|
|
47
54
|
Every security rule produces a **structured 2-line error message**:
|
|
48
55
|
|
|
49
56
|
```bash
|
|
@@ -61,20 +68,15 @@ src/handlers/api.ts
|
|
|
61
68
|
- ✅ **Fix instruction** - exact code to write
|
|
62
69
|
- 📚 **Documentation link** - learn more
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
| Preset | Description |
|
|
66
|
-
| :------------ | :--------------------------------------------------------------------- |
|
|
67
|
-
| `recommended` | Balanced security for Lambda projects (critical as error, others warn) |
|
|
68
|
-
| `strict` | Maximum security enforcement (all rules as errors) |
|
|
69
|
-
|
|
70
|
-
## 📚 Supported Libraries
|
|
71
|
-
| Library | npm | Downloads | Detection |
|
|
72
|
-
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
|
|
73
|
-
| `aws-lambda` | [](https://www.npmjs.com/package/aws-lambda) | [](https://www.npmjs.com/package/aws-lambda) | IAM, Logging, Timeouts |
|
|
74
|
-
| `@aws-sdk/client-lambda` | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | [](https://www.npmjs.com/package/@aws-sdk/client-lambda) | Credential Safety |
|
|
75
|
-
| `middy` | [](https://www.npmjs.com/package/@middy/core) | [](https://www.npmjs.com/package/@middy/core) | Middleware Security |
|
|
71
|
+
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.
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
## 💡 What You Get
|
|
74
|
+
- **Serverless-focused coverage:** 5 rules targeting Lambda-specific vulnerabilities (credentials, CORS, secrets, logging).
|
|
75
|
+
- **LLM-optimized & MCP-ready:** Structured 2-line messages with CWE + OWASP + CVSS + concrete fixes so humans _and_ AI auto-fixers stay aligned.
|
|
76
|
+
- **Standards aligned:** OWASP Serverless Top 10, CWE tagging, CVSS scoring in every finding for compliance mapping.
|
|
77
|
+
- **Tiered presets:** `recommended`, `strict` for fast policy rollout.
|
|
78
|
+
- **Framework-aware:** Detects Middy middleware, API Gateway response patterns, AWS SDK v3 clients.
|
|
79
|
+
- **Low false positive rate:** Context-aware detection with production heuristics.
|
|
78
80
|
|
|
79
81
|
## ⚙️ Configuration Options
|
|
80
82
|
All rules accept these common options:
|
|
@@ -93,7 +95,13 @@ All rules accept these common options:
|
|
|
93
95
|
}
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
## 📦 Compatibility
|
|
99
|
+
| Package | Version |
|
|
100
|
+
| :--- | :--- |
|
|
101
|
+
| ESLint | `^8.0.0 \|\| ^9.0.0 \|\| ^10.0.0` |
|
|
102
|
+
| Node.js | `>=18.0.0` |
|
|
103
|
+
|
|
104
|
+
See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
|
|
97
105
|
|
|
98
106
|
## Rules
|
|
99
107
|
|
|
@@ -102,28 +110,32 @@ All rules accept these common options:
|
|
|
102
110
|
| Icon | Description |
|
|
103
111
|
| :---: | :--- |
|
|
104
112
|
| 💼 | **Recommended**: Included in the recommended preset. |
|
|
105
|
-
| ⚠️ | **Warns**: Set
|
|
113
|
+
| ⚠️ | **Warns**: Set to warn in recommended preset. |
|
|
106
114
|
| 🔧 | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
107
115
|
| 💡 | **Suggestions**: Providing code suggestions in IDE. |
|
|
108
116
|
| 🚫 | **Deprecated**: This rule is deprecated. |
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
| [no-
|
|
117
|
-
| [no-
|
|
118
|
-
| [no-
|
|
119
|
-
| [no-
|
|
120
|
-
| [no-
|
|
121
|
-
| [no-
|
|
122
|
-
| [no-
|
|
123
|
-
| [no-
|
|
124
|
-
| [no-
|
|
125
|
-
| [
|
|
126
|
-
|
|
117
|
+
| 🟢 | **Type-unaware**: AST-only, runs in oxlint JS-plugin tier. |
|
|
118
|
+
| 🟡 | **Type-aware (refining)**: pure-AST primary path; types refine precision. |
|
|
119
|
+
| 🟠 | **Type-aware (graceful)**: requires TS program; silent without it. |
|
|
120
|
+
|
|
121
|
+
<!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
|
|
122
|
+
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|
|
123
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
124
|
+
| [no-env-logging](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-env-logging?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-532 | A09:2021 | | Detect logging of process.env which may expose secrets | 🟢 | | ⚠️ | | | |
|
|
125
|
+
| [no-error-swallowing](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-error-swallowing?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-390 | A09:2021 | | Detect empty catch blocks and missing error logging | 🟢 | | ⚠️ | | | |
|
|
126
|
+
| [no-exposed-debug-endpoints](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-exposed-debug-endpoints?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-489 | A05:2021 | | Detect debug endpoints without authentication in Lambda handlers | 🟢 | 💼 | | | | |
|
|
127
|
+
| [no-exposed-error-details](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-exposed-error-details?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-209 | A01:2021 | | Detect Lambda handlers exposing internal error details in responses | 🟢 | | ⚠️ | | | |
|
|
128
|
+
| [no-hardcoded-credentials-sdk](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-hardcoded-credentials-sdk?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-798 | | | Detects hardcoded AWS credentials in SDK client configurations | 🟢 | 💼 | | | | |
|
|
129
|
+
| [no-missing-authorization-check](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-missing-authorization-check?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | | | | Security rule for lambda-security. This rule is part of eslint-plugin-lambda-security and provides LLM-opti… | 🟢 | | ⚠️ | | | |
|
|
130
|
+
| [no-overly-permissive-iam-policy](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-overly-permissive-iam-policy?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-732 | | | Security rule for lambda-security. This rule is part of eslint-plugin-lambda-security and provides LLM-opti… | 🟢 | 💼 | | | | |
|
|
131
|
+
| [no-permissive-cors-middy](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-permissive-cors-middy?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-942 | | | Detects permissive CORS configurations in Middy middleware | 🟢 | 💼 | | | | |
|
|
132
|
+
| [no-permissive-cors-response](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-permissive-cors-response?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-942 | | | Detects permissive CORS headers in Lambda API Gateway responses | 🟢 | 💼 | | | | |
|
|
133
|
+
| [no-secrets-in-env](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-secrets-in-env?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-798 | | | Detects secrets defined directly in environment variable configurations | 🟢 | 💼 | | | | |
|
|
134
|
+
| [no-unbounded-batch-processing](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-unbounded-batch-processing?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-770 | | | Detect processing batch records without size validation | 🟢 | | ⚠️ | | | |
|
|
135
|
+
| [no-unvalidated-event-body](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-unvalidated-event-body?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-20 | A03:2021 | | Detect Lambda handlers using event body without validation | 🟢 | | ⚠️ | | | |
|
|
136
|
+
| [no-user-controlled-requests](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/no-user-controlled-requests?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-918 | A10:2021 | | Detect HTTP requests with user-controlled URLs (SSRF) | 🟢 | 💼 | | | | |
|
|
137
|
+
| [require-timeout-handling](https://eslint.interlace.tools/docs/security/plugin-lambda-security/rules/require-timeout-handling?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security) | CWE-400 | | | Require timeout handling in Lambda handlers with external calls | 🟢 | | ⚠️ | | | |
|
|
138
|
+
<!-- AUTO-GENERATED:RULES_TABLE:END -->
|
|
127
139
|
## 🔗 Related ESLint Plugins
|
|
128
140
|
|
|
129
141
|
Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with LLM-optimized error messages:
|
|
@@ -132,7 +144,7 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
132
144
|
| :--- | :---: | :--- |
|
|
133
145
|
| [`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. |
|
|
134
146
|
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
135
|
-
| [`eslint-plugin-
|
|
147
|
+
| [`eslint-plugin-node-security`](https://www.npmjs.com/package/eslint-plugin-node-security) | [](https://www.npmjs.com/package/eslint-plugin-node-security) | Node.js core-module security (fs, child_process, vm, crypto, Buffer). |
|
|
136
148
|
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
137
149
|
| [`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. |
|
|
138
150
|
| [`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. |
|
|
@@ -142,10 +154,19 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
142
154
|
| [`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. |
|
|
143
155
|
| [`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. |
|
|
144
156
|
|
|
157
|
+
<!-- INTERLACE:STAR_CTA:START -->
|
|
158
|
+
## ⭐ Support & follow
|
|
159
|
+
|
|
160
|
+
If this plugin caught a real bug for you, **[star the repo](https://github.com/ofri-peretz/eslint)** — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and **[follow the writeups on Dev.to](https://dev.to/ofri-peretz)** for the benchmarks and security research behind these rules.
|
|
161
|
+
|
|
162
|
+
[](https://github.com/ofri-peretz/eslint)
|
|
163
|
+
|
|
164
|
+
<!-- INTERLACE:STAR_CTA:END -->
|
|
165
|
+
|
|
145
166
|
## 📄 License
|
|
146
167
|
|
|
147
168
|
MIT © [Ofri Peretz](https://github.com/ofri-peretz)
|
|
148
169
|
|
|
149
170
|
<p align="center">
|
|
150
|
-
<a href="https://eslint.interlace.tools/docs/security/plugin-lambda-security"><img src="https://eslint.interlace.tools/images/og-lambda-security.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
171
|
+
<a href="https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security"><img src="https://eslint.interlace.tools/images/og-lambda-security.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
151
172
|
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-lambda-security",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
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",
|
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
"./types": {
|
|
14
14
|
"types": "./src/types/index.d.ts",
|
|
15
15
|
"default": "./src/types/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./oxlint": {
|
|
18
|
+
"types": "./src/oxlint.d.ts",
|
|
19
|
+
"default": "./src/oxlint.js"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"author": "Ofri Peretz <ofriperetzdev@gmail.com>",
|
|
19
23
|
"license": "MIT",
|
|
20
|
-
"homepage": "https://
|
|
24
|
+
"homepage": "https://eslint.interlace.tools/docs/security/plugin-lambda-security?utm_source=npm&utm_medium=referral&utm_campaign=eslint-plugin-lambda-security",
|
|
21
25
|
"repository": {
|
|
22
26
|
"type": "git",
|
|
23
27
|
"url": "https://github.com/ofri-peretz/eslint",
|
|
@@ -64,9 +68,11 @@
|
|
|
64
68
|
},
|
|
65
69
|
"dependencies": {
|
|
66
70
|
"tslib": "^2.3.0",
|
|
67
|
-
"@interlace/eslint-devkit": "^1.
|
|
71
|
+
"@interlace/eslint-devkit": "^1.4.1"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
68
75
|
},
|
|
69
|
-
"peerDependencies": {},
|
|
70
76
|
"peerDependenciesMeta": {
|
|
71
77
|
"@aws-sdk/client-lambda": {
|
|
72
78
|
"optional": true
|
|
@@ -87,5 +93,15 @@
|
|
|
87
93
|
"devDependencies": {
|
|
88
94
|
"@typescript-eslint/parser": "^8.46.2",
|
|
89
95
|
"@typescript-eslint/rule-tester": "^8.46.2"
|
|
96
|
+
},
|
|
97
|
+
"scripts": {
|
|
98
|
+
"build": "tsx ../../scripts/build-package.ts",
|
|
99
|
+
"test": "vitest run",
|
|
100
|
+
"test:coverage": "vitest run --coverage",
|
|
101
|
+
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
102
|
+
},
|
|
103
|
+
"funding": {
|
|
104
|
+
"type": "github",
|
|
105
|
+
"url": "https://github.com/ofri-peretz/eslint"
|
|
90
106
|
}
|
|
91
|
-
}
|
|
107
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* - SAS-7: Denial of Service ✅ (require-timeout-handling, no-unbounded-batch-processing)
|
|
22
22
|
* - SAS-8: Server-Side Request Forgery ✅ (no-user-controlled-requests)
|
|
23
23
|
* - SAS-9: Functions Misconfiguration ✅ (no-exposed-error-details)
|
|
24
|
-
* - SAS-10: Improper Crypto ➡️ (Use eslint-plugin-
|
|
24
|
+
* - SAS-10: Improper Crypto ➡️ (Use eslint-plugin-node-security)
|
|
25
25
|
*/
|
|
26
26
|
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
27
27
|
export declare const rules: Record<string, TSESLint.RuleModule<string, readonly unknown[]>>;
|
package/src/index.js
CHANGED
package/src/oxlint.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* oxlint sub-export.
|
|
8
|
+
*
|
|
9
|
+
* Consumers wire oxlint to this entry via:
|
|
10
|
+
* { "jsPlugins": ["eslint-plugin-lambda-security/oxlint"] }
|
|
11
|
+
*
|
|
12
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-lambda-security/oxlint')` and reads
|
|
13
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
14
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
15
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
16
|
+
*
|
|
17
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
18
|
+
*/
|
|
19
|
+
import { plugin } from './index';
|
|
20
|
+
export = plugin;
|
package/src/oxlint.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* oxlint sub-export.
|
|
9
|
+
*
|
|
10
|
+
* Consumers wire oxlint to this entry via:
|
|
11
|
+
* { "jsPlugins": ["eslint-plugin-lambda-security/oxlint"] }
|
|
12
|
+
*
|
|
13
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-lambda-security/oxlint')` and reads
|
|
14
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
15
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
16
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
17
|
+
*
|
|
18
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
19
|
+
*/
|
|
20
|
+
const index_1 = require("./index");
|
|
21
|
+
module.exports = index_1.plugin;
|