Skip to content

Commit 4ff825c

Browse files
authored
fix: remove vulnerable dependencies and resolve npm audit findings (#453)
- replace ip-cidr and crypto-browserify with ipaddr.js and native node:crypto, bump mathjs to v15, and update semantic-release's nested @actions/http-client/undici chain to close all reported vulnerabilities.
1 parent 14305e0 commit 4ff825c

7 files changed

Lines changed: 3613 additions & 4174 deletions

File tree

package-lock.json

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

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,14 @@
277277
"browserify-zlib": "^0.2.0",
278278
"chalk": "^5.6.2",
279279
"cookie": "^1.0.2",
280-
"crypto-browserify": "^3.12.1",
281280
"dotenv": "^17.2.2",
282281
"esbuild": "^0.25.10",
283282
"events": "^3.3.0",
284283
"fast-glob": "^3.3.3",
285284
"inherits": "^2.0.4",
286-
"ip-cidr": "^4.0.2",
285+
"ipaddr.js": "^2.4.0",
287286
"lodash-es": "^4.17.21",
288-
"mathjs": "^13.1.1",
287+
"mathjs": "^15.2.0",
289288
"mime": "^4.1.0",
290289
"mime-types": "^3.0.1",
291290
"pcre-to-regexp": "^1.1.0",

packages/bundler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"esbuild": "^0.25.10",
4343
"events": "^3.3.0",
4444
"inherits": "^2.0.4",
45-
"ip-cidr": "^4.0.2",
45+
"ipaddr.js": "^2.4.0",
4646
"lodash-es": "^4.17.21",
4747
"mime": "^4.1.0",
4848
"mime-types": "^3.0.1",

packages/bundler/src/polyfills/azion/network-list/context/network-list.context.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ipCidrLib from 'ip-cidr';
1+
import ipaddr from 'ipaddr.js';
22
import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
33
import { createRequire } from 'node:module';
44
import nodePath from 'node:path';
@@ -71,8 +71,7 @@ class NetworkListContext {
7171
return listContent.some((currentIp) => {
7272
if (currentIp.includes('/')) {
7373
try {
74-
const cidr = new ipCidrLib(currentIp);
75-
return cidr.contains(ipAddress);
74+
return ipaddr.parse(ipAddress).match(ipaddr.parseCIDR(currentIp));
7675
} catch {
7776
return false; // Invalid CIDR format
7877
}

packages/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"ajv": "^8.17.1",
3737
"ajv-errors": "^3.0.0",
3838
"ajv-keywords": "^5.1.0",
39-
"mathjs": "^13.1.1"
39+
"mathjs": "^15.2.0"
4040
},
4141
"devDependencies": {
4242
"@jest/globals": "^29.7.0",

packages/unenv-preset/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,5 @@
2525
"dist",
2626
"package.json",
2727
"src/polyfills/*"
28-
],
29-
"dependencies": {
30-
"crypto-browserify": "^3.12.1"
31-
}
28+
]
3229
}

packages/unenv-preset/src/polyfills/node/crypto.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)