eslint-plugin-lambda-security 1.2.11 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/package.json +8 -3
- package/src/index.js +1 -1
- package/src/rules/no-permissive-cors-response/index.js +1 -12
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<p align="center">
|
|
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/
|
|
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/logos/interlace.svg" alt="Interlace" height="90" /></a>
|
|
3
3
|
|
|
4
|
-
<a href="https://
|
|
4
|
+
<a href="https://aws.amazon.com/lambda/" target="_blank"><img src="https://eslint.interlace.tools/logos/lambda.svg" alt="AWS Lambda" height="90" /></a>
|
|
5
|
+
|
|
6
|
+
<a href="https://oxc.rs" target="_blank"><img src="https://eslint.interlace.tools/logos/oxlint.svg" alt="oxlint" height="90" /></a>
|
|
7
|
+
|
|
8
|
+
<a href="https://eslint.org" target="_blank"><img src="https://eslint.interlace.tools/logos/eslint.svg" alt="ESLint" height="90" /></a>
|
|
5
9
|
</p>
|
|
6
10
|
|
|
7
11
|
<p align="center">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-lambda-security",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "ESLint plugin for AWS Lambda security — detects overly permissive IAM policies and CORS, unvalidated event bodies, secrets in env vars, and leaked error details.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -72,10 +72,15 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"tslib": "^2.3.0",
|
|
75
|
-
"@interlace/eslint-devkit": "^1.
|
|
75
|
+
"@interlace/eslint-devkit": "^1.7.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
78
|
+
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
79
|
+
"@aws-sdk/client-lambda": "^3.0.0",
|
|
80
|
+
"@middy/core": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
81
|
+
"@middy/http-cors": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
82
|
+
"@middy/http-security-headers": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
83
|
+
"@middy/validator": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
79
84
|
},
|
|
80
85
|
"peerDependenciesMeta": {
|
|
81
86
|
"@aws-sdk/client-lambda": {
|
package/src/index.js
CHANGED
|
@@ -41,23 +41,12 @@ exports.noPermissiveCorsResponse = (0, eslint_devkit_1.createRule)({
|
|
|
41
41
|
default: true,
|
|
42
42
|
description: 'Allow permissive CORS in test files',
|
|
43
43
|
},
|
|
44
|
-
allowedOrigins: {
|
|
45
|
-
type: 'array',
|
|
46
|
-
items: { type: 'string' },
|
|
47
|
-
default: [],
|
|
48
|
-
description: 'Patterns for allowed origins',
|
|
49
|
-
},
|
|
50
44
|
},
|
|
51
45
|
additionalProperties: false,
|
|
52
46
|
},
|
|
53
47
|
],
|
|
54
48
|
},
|
|
55
|
-
defaultOptions: [
|
|
56
|
-
{
|
|
57
|
-
allowInTests: true,
|
|
58
|
-
allowedOrigins: [],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
49
|
+
defaultOptions: [{ allowInTests: true }],
|
|
61
50
|
create(context, [options = {}]) {
|
|
62
51
|
const { allowInTests = true } = options;
|
|
63
52
|
const filename = context.filename;
|