Skip to content

Commit 9e5b29c

Browse files
authored
Merge pull request #49 from advanced-security/node20
Maintenance: Node 20, current dependencies, linting fixes
2 parents 002cd98 + 6fb0ed8 commit 9e5b29c

File tree

39 files changed

+34185
-10359
lines changed

39 files changed

+34185
-10359
lines changed

functions/authorizers/githubWebhookIPValidator/package-lock.json

Lines changed: 3500 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

functions/authorizers/githubWebhookIPValidator/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@
99
"author": "",
1010
"license": "ISC",
1111
"devDependencies": {
12-
"@tsconfig/node14": "^1.0.3",
13-
"@types/aws-lambda": "^8.10.101",
12+
"@tsconfig/node18": "^1.0.1",
13+
"@types/aws-lambda": "^8.10.109",
1414
"@types/ip": "^1.1.0",
1515
"@types/json-schema": "^7.0.11",
16-
"@types/node": "^18.0.0",
17-
"@typescript-eslint/eslint-plugin": "^5.30.0",
18-
"@typescript-eslint/parser": "^5.30.0",
19-
"eslint": "^8.18.0",
16+
"@types/node": "^18.11.17",
17+
"@typescript-eslint/eslint-plugin": "^5.47.0",
18+
"@typescript-eslint/parser": "^5.47.0",
19+
"eslint": "^8.30.0",
2020
"eslint-config-prettier": "^8.5.0",
2121
"eslint-plugin-prettier": "^4.2.1",
22-
"prettier": "^2.7.1",
23-
"ts-node": "^10.8.1",
24-
"tslib": "^2.4.0",
25-
"typescript": "^4.7.4"
22+
"prettier": "^2.8.1",
23+
"ts-node": "^10.9.1",
24+
"tslib": "^2.4.1",
25+
"typescript": "^4.9.4"
2626
},
2727
"engines": {
28-
"node": "16"
28+
"node": "20"
2929
},
3030
"repository": {
3131
"type": "git",
32-
"url": "https://github.com/NickLiffen/GSSAR"
32+
"url": "https://github.com/advanced-security/GSSAR"
3333
},
3434
"dependencies": {
35-
"@aws-sdk/client-ssm": "^3.121.0",
36-
"@octokit/auth-app": "^3.6.1",
37-
"@octokit/graphql": "^4.8.0",
35+
"@aws-sdk/client-ssm": "^3.816.0",
36+
"@octokit/auth-app": "^8.0.1",
37+
"@octokit/graphql": "^9.0.1",
3838
"ip": "^2.0.1"
3939
}
4040
}

functions/authorizers/githubWebhookIPValidator/src/checkIPs.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import { cidrSubnet } from "ip";
22

33
const findIP = (keys: string[], ipToCheck: string) => {
4-
const even = (e: string) => {
5-
return cidrSubnet(e).contains(ipToCheck);
6-
};
7-
const values = (a: any) => {
8-
return a.some(even);
9-
};
10-
return keys.some(values);
4+
return keys.some((cidr) => cidrSubnet(cidr).contains(ipToCheck));
115
};
126

137
export const checkIPs = async (

functions/authorizers/githubWebhookIPValidator/types/common/package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)