eslint-plugin-lambda-security 1.2.8 → 1.2.10

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 (35) hide show
  1. package/package.json +24 -20
  2. package/src/index.d.ts +17 -30
  3. package/src/index.js +1 -24
  4. package/src/oxlint.d.ts +17 -20
  5. package/src/oxlint.js +0 -18
  6. package/src/rules/no-env-logging/index.js +0 -23
  7. package/src/rules/no-error-swallowing/index.js +1 -27
  8. package/src/rules/no-exposed-debug-endpoints/index.js +0 -13
  9. package/src/rules/no-exposed-error-details/index.js +0 -17
  10. package/src/rules/no-hardcoded-credentials-sdk/index.js +4 -43
  11. package/src/rules/no-missing-authorization-check/index.js +0 -31
  12. package/src/rules/no-overly-permissive-iam-policy/index.js +0 -17
  13. package/src/rules/no-permissive-cors-middy/index.js +0 -16
  14. package/src/rules/no-permissive-cors-response/index.js +19 -41
  15. package/src/rules/no-secrets-in-env/index.js +0 -18
  16. package/src/rules/no-unbounded-batch-processing/index.js +4 -20
  17. package/src/rules/no-unvalidated-event-body/index.js +19 -86
  18. package/src/rules/no-user-controlled-requests/index.js +2 -48
  19. package/src/rules/require-timeout-handling/index.js +0 -20
  20. package/AGENTS.md +0 -106
  21. package/CHANGELOG.md +0 -184
  22. package/src/rules/no-env-logging/index.d.ts +0 -23
  23. package/src/rules/no-error-swallowing/index.d.ts +0 -26
  24. package/src/rules/no-exposed-debug-endpoints/index.d.ts +0 -14
  25. package/src/rules/no-exposed-error-details/index.d.ts +0 -24
  26. package/src/rules/no-hardcoded-credentials-sdk/index.d.ts +0 -24
  27. package/src/rules/no-missing-authorization-check/index.d.ts +0 -26
  28. package/src/rules/no-overly-permissive-iam-policy/index.d.ts +0 -24
  29. package/src/rules/no-permissive-cors-middy/index.d.ts +0 -24
  30. package/src/rules/no-permissive-cors-response/index.d.ts +0 -26
  31. package/src/rules/no-secrets-in-env/index.d.ts +0 -26
  32. package/src/rules/no-unbounded-batch-processing/index.d.ts +0 -26
  33. package/src/rules/no-unvalidated-event-body/index.d.ts +0 -26
  34. package/src/rules/no-user-controlled-requests/index.d.ts +0 -24
  35. package/src/rules/require-timeout-handling/index.d.ts +0 -24
package/CHANGELOG.md DELETED
@@ -1,184 +0,0 @@
1
- ## [1.2.3] - 2026-02-08
2
-
3
- ## 1.2.8
4
-
5
- ### Patch Changes
6
-
7
- - [#269](https://github.com/ofri-peretz/eslint/pull/269) [`7028fe2`](https://github.com/ofri-peretz/eslint/commit/7028fe2668a42266d831014184dcef70e73101ad) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - docs: dual-logo README header (Interlace mark + ESLint mark side by side) and closing Interlace footer — refreshes the README rendered on npmjs.com. No runtime changes.
8
-
9
- - Updated dependencies [[`7028fe2`](https://github.com/ofri-peretz/eslint/commit/7028fe2668a42266d831014184dcef70e73101ad)]:
10
- - @interlace/eslint-devkit@1.4.2
11
-
12
- ## 1.2.7
13
-
14
- ### Patch Changes
15
-
16
- - [#252](https://github.com/ofri-peretz/eslint/pull/252) [`d67e395`](https://github.com/ofri-peretz/eslint/commit/d67e3953c2748ad36e6aebe0f24b1d04e518b4d0) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Fix Codecov badge showing "unknown" — switch from flag to component URL format
17
-
18
- ## 1.2.6
19
-
20
- ### Patch Changes
21
-
22
- - [#225](https://github.com/ofri-peretz/eslint/pull/225) [`34ff5a8`](https://github.com/ofri-peretz/eslint/commit/34ff5a8e6f5126c5d1c0a524759e0af2b5476b46) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - CI-only: pin all coverage thresholds at 100% (integration target, merges last).
23
-
24
- ## 1.2.5
25
-
26
- ### Patch Changes
27
-
28
- - [#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.
29
-
30
- The published `1.2.3` tarball was a **stale build**: its rules still threw on the
31
- generated lambda-ai-corpus handlers, even though source had already been fixed.
32
- This republishes the corrected build and locks it with a regression test.
33
- - **`no-error-swallowing`** no longer throws `RangeError: Maximum call stack size
34
- exceeded`. The old build walked the catch-block AST by hand and recursed through
35
- the cyclic `node.parent` reference; source now uses `sourceCode.getText()` + a
36
- regex.
37
- - **`require-timeout-handling`**, **`no-missing-authorization-check`**, and
38
- **`no-unbounded-batch-processing`** no longer throw `Error: Unknown class name:
39
- exit`. They used a grouped `:exit` selector (`'A:exit, B:exit, C:exit'`); ESLint
40
- only strips the trailing `:exit`, so esquery received a bare `:exit`. Source now
41
- uses one listener key per node type.
42
- - `plugin.meta.version` is now read from `package.json` instead of a hardcoded
43
- string, so a build can no longer mislabel its own version (1.2.3 embedded
44
- `1.1.0`).
45
-
46
- - [#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
47
- emits. The emitted machine-readable message sources its `CVSS:x` from
48
- `CWE_MAPPING` via `formatLLMMessage` → `enrichFromCWE`, but the static
49
- `meta.docs.cvss` documentation field had drifted on 45 rules across these 7
50
- plugins — e.g. `no-hardcoded-credentials` documented `9.5` while emitting
51
- `CVSS:9.8` (the value the published article and SARIF/LLM consumers already
52
- read).
53
-
54
- This corrects the **documentation metadata only** — no emitted finding changes.
55
- Locked by `security-cvss-docs-consistency.lock.test.ts` (cross-plugin: every
56
- security rule's `meta.docs.cvss` must equal the CVSS it emits), the
57
- `no-hardcoded-credentials` rule lock (real ESLint `Linter` emission), and a
58
- devkit `enrichFromCWE` contract test pinning `CWE-798 → 9.8`.
59
-
60
- Follow-up (not in scope): 50 security rules document a CVSS that never appears
61
- in any emitted message (their messages carry no CWE), and several rules emit the
62
- generic CWE score where a rule-specific score may be warranted — both change
63
- emitted output and are separate decisions.
64
-
65
- ## 1.2.4
66
-
67
- ### Patch Changes
68
-
69
- - [#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
70
-
71
- **`no-unlimited-resource-allocation` — FP reduction (430 Edge FPs)**
72
- - 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)
73
- - Skip `Array.isArray`, `Array.from`, `Array.of` calls in the `alloc/Array` pattern check (these don't allocate unbounded memory)
74
-
75
- **`no-hardcoded-credentials` — FP reduction (~280 Edge FPs)**
76
- - Extended test-file skip to cover `.fixture.`, `.mock.`, `__mocks__/`, `/tests/`, `/fixtures/`, `/mocks/` paths
77
- - 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
78
-
79
- **Doc examples — 4 rules now have ❌ Incorrect examples**
80
- - `lambda-security/no-missing-authorization-check`
81
- - `lambda-security/no-overly-permissive-iam-policy`
82
- - `node-security/prefer-native-crypto` (renamed non-standard `### ❌ Third-Party (Flagged)` to `### ❌ Incorrect`)
83
- - `vercel-ai-security/require-tool-confirmation` (replaced placeholder with a real tested example)
84
-
85
- **`ilb-doc-test-alignment` scanner fixes**
86
- - Accept both `## ❌` and `### ❌` headings (docs use H3 under an H2 `## Examples` section; was only finding H2)
87
- - Slice from end-of-line rather than end-of-regex-match (prevents `## ❌ Incorrect Code` from leaving a partial heading in the parsed section)
88
-
89
- Result: `ilb:doc-test-alignment` → 206 ok, 0 doc has no ❌ examples (was 165 missing).
90
-
91
- - [#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.
92
-
93
- 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:
94
-
95
- ```
96
- 'ArrowFunctionExpression:exit, FunctionExpression:exit, FunctionDeclaration:exit'
97
- ```
98
-
99
- 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.
100
-
101
- 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.
102
-
103
- `@interlace/eslint-config` re-exports the `recommended` config and is republished against the fixed plugin.
104
-
105
- - [#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
106
-
107
- Rules that were recognized as null guards are now correctly identified as safe:
108
- 1. **Truthy if guard** — `if (obj) { obj.prop }` — direct truthy check proves non-null. Also covers chains: `if (response)` protects `response.data.items`.
109
- 2. **Short-circuit AND** — `obj && obj.prop` — right side of `&&` only runs when left is truthy.
110
- 3. **Ternary consequent** — `obj ? obj.prop : fallback` — truthy test guards the consequent.
111
-
112
- 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.
113
-
114
- - Updated dependencies [[`736a5fe`](https://github.com/ofri-peretz/eslint/commit/736a5fed47e673f6157ea900b29fe2a54e4bc7df)]:
115
- - @interlace/eslint-devkit@1.4.1
116
-
117
- ### Bug Fixes
118
-
119
- - align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
120
-
121
- ### Documentation
122
-
123
- - fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
124
-
125
- ### ❤️ Thank You
126
-
127
- - Ofri Peretz
128
-
129
- ## [1.2.2] - 2026-02-06
130
-
131
- ### Bug Fixes
132
-
133
- - align codecov component names and update docs components ([0a59a86c](https://github.com/ofri-peretz/eslint/commit/0a59a86c))
134
-
135
- ### ❤️ Thank You
136
-
137
- - Ofri Peretz
138
-
139
- ## [1.2.1] - 2026-02-02
140
-
141
- This was a version bump only for eslint-plugin-lambda-security to align it with other projects, there were no code changes.
142
-
143
- # Changelog
144
-
145
- All notable changes to `eslint-plugin-lambda-security` will be documented in this file.
146
-
147
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
148
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
149
-
150
- ## [1.0.0] - 2025-12-29
151
-
152
- ### Added
153
-
154
- #### Credential & Secrets Protection Rules (3)
155
-
156
- - `no-hardcoded-credentials-sdk` - Detect hardcoded AWS credentials in SDK v3 clients (CWE-798)
157
- - `no-secrets-in-env` - Detect secrets hardcoded in environment variables (CWE-798)
158
- - `no-env-logging` - Detect logging entire process.env object (CWE-532)
159
-
160
- #### CORS Security Rules (2)
161
-
162
- - `no-permissive-cors-response` - Detect wildcard CORS in Lambda response headers (CWE-942)
163
- - `no-permissive-cors-middy` - Detect permissive CORS in @middy/http-cors middleware (CWE-942)
164
-
165
- #### Presets (2)
166
-
167
- - `recommended` - Balanced security defaults
168
- - `strict` - All 5 rules as errors
169
-
170
- #### Features
171
-
172
- - LLM-optimized error messages with CWE references
173
- - OWASP Serverless Top 10 alignment (SAS-2, SAS-3, SAS-4)
174
- - AWS SDK v3 client detection (S3, DynamoDB, Lambda, STS, etc.)
175
- - Middy middleware detection (@middy/http-cors)
176
- - Real AWS access key pattern matching (AKIA*, ASIA*)
177
- - TypeScript support with exported option types
178
- - Comprehensive test coverage (78 tests, 97.40% line coverage)
179
- - Auto-fix for CORS violations
180
-
181
- ### Security
182
-
183
- - Covers 3 CWEs: 532, 798, 942
184
- - Maps to OWASP Serverless Top 10: SAS-2, SAS-3, SAS-4
@@ -1,23 +0,0 @@
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
- * ESLint Rule: no-env-logging
8
- * Detects logging of environment variables which may contain secrets
9
- * CWE-532: Insertion of Sensitive Information into Log File
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/532.html
12
- */
13
- import type { TSESLint } from '@interlace/eslint-devkit';
14
- type MessageIds = 'envLogging' | 'removeEnvLogging';
15
- export interface Options {
16
- /** Allow in test files. Default: true */
17
- allowInTests?: boolean;
18
- }
19
- type RuleOptions = [Options?];
20
- export declare const noEnvLogging: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
21
- name: string;
22
- };
23
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-error-swallowing
8
- * Detects empty catch blocks and missing error logging
9
- * CWE-390: Detection of Error Condition Without Action
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/390.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'emptyCatchBlock' | 'addErrorLogging';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Allow comments as documentation of intentional swallowing. Default: true */
20
- allowWithComment?: boolean;
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noErrorSwallowing: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * Copyright (c) 2025 Ofri Peretz
3
- * Licensed under the MIT License. Use of this source code is governed by the
4
- * MIT license that can be found in the LICENSE file.
5
- */
6
- export interface Options {
7
- endpoints?: string[];
8
- ignoreFiles?: string[];
9
- }
10
- type RuleOptions = [Options?];
11
- export declare const noExposedDebugEndpoints: import("@typescript-eslint/utils/ts-eslint").RuleModule<"violationDetected", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
12
- name: string;
13
- };
14
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: no-exposed-error-details
8
- * Detects Lambda handlers exposing internal error details
9
- * CWE-209: Generation of Error Message Containing Sensitive Information
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/209.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'exposedErrorDetails' | 'sanitizeError';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const noExposedErrorDetails: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: no-hardcoded-credentials-sdk
8
- * Detects hardcoded AWS credentials in SDK client configurations
9
- * CWE-798: Use of Hard-coded Credentials
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/798.html
12
- * @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-browser-credentials-browser.html
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'hardcodedCredentials' | 'useCredentialProvider';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const noHardcodedCredentialsSdk: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-missing-authorization-check
8
- * Detects Lambda handlers without authorization checks
9
- * CWE-862: Missing Authorization
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/862.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'missingAuthCheck' | 'addAuthCheck';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Handler file patterns to check. Default: common Lambda patterns */
20
- handlerPatterns?: string[];
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noMissingAuthorizationCheck: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: no-overly-permissive-iam-policy
8
- * Detects IAM policies with overly broad permissions
9
- * CWE-732: Incorrect Permission Assignment for Critical Resource
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/732.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'permissivePolicy' | 'useLeastPrivilege';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const noOverlyPermissiveIamPolicy: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: no-permissive-cors-middy
8
- * Detects @middy/http-cors middleware with permissive origin configuration
9
- * CWE-942: Permissive Cross-domain Policy with Untrusted Domains
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/942.html
12
- * @see https://middy.js.org/docs/middlewares/http-cors
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'permissiveCors' | 'useSpecificOrigins';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const noPermissiveCorsMidly: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-permissive-cors-response
8
- * Detects `Access-Control-Allow-Origin: '*'` in Lambda response headers
9
- * CWE-942: Permissive Cross-domain Policy with Untrusted Domains
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/942.html
12
- * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'permissiveCors' | 'useSpecificOrigin';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Allowed origins (patterns). Default: [] */
20
- allowedOrigins?: string[];
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noPermissiveCorsResponse: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-secrets-in-env
8
- * Detects secrets directly assigned to process.env or hardcoded in environment configurations
9
- * CWE-798: Use of Hard-coded Credentials
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/798.html
12
- * @see https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'secretsInEnv' | 'useSecretsManager';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Additional secret patterns to detect. Default: [] */
20
- additionalPatterns?: string[];
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noSecretsInEnv: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-unbounded-batch-processing
8
- * Detects processing arrays/records without size limits
9
- * CWE-770: Allocation of Resources Without Limits
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/770.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'unboundedBatch' | 'addBatchLimit';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Maximum allowed batch size before warning. Default: 100 */
20
- maxBatchSize?: number;
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noUnboundedBatchProcessing: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,26 +0,0 @@
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
- * ESLint Rule: no-unvalidated-event-body
8
- * Detects Lambda handlers using event body/params without validation
9
- * CWE-20: Improper Input Validation
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/20.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'unvalidatedInput' | 'useValidation';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- /** Additional event properties to check. Default: [] */
20
- additionalProperties?: string[];
21
- }
22
- type RuleOptions = [Options?];
23
- export declare const noUnvalidatedEventBody: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
24
- name: string;
25
- };
26
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: no-user-controlled-requests
8
- * Detects HTTP requests with user-controlled URLs (SSRF)
9
- * CWE-918: Server-Side Request Forgery (SSRF)
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/918.html
12
- * @see https://owasp.org/www-community/attacks/Server_Side_Request_Forgery
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'ssrfVulnerability' | 'useAllowlist';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const noUserControlledRequests: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};
@@ -1,24 +0,0 @@
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
- * ESLint Rule: require-timeout-handling
8
- * Warns when Lambda handlers lack timeout handling
9
- * CWE-400: Uncontrolled Resource Consumption
10
- *
11
- * @see https://cwe.mitre.org/data/definitions/400.html
12
- * @see https://owasp.org/www-project-serverless-top-10/
13
- */
14
- import type { TSESLint } from '@interlace/eslint-devkit';
15
- type MessageIds = 'missingTimeoutHandling' | 'addTimeoutCheck';
16
- export interface Options {
17
- /** Allow in test files. Default: true */
18
- allowInTests?: boolean;
19
- }
20
- type RuleOptions = [Options?];
21
- export declare const requireTimeoutHandling: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
22
- name: string;
23
- };
24
- export {};