Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(ci): fix npm audit vulnerabilities (#2682)

firecrawl-spring[bot]042b4857af33
diff --git a/apps/api/audit-ci.jsonc b/apps/api/audit-ci.jsonc
index 81a59c2dc..6ba44f0fa 100644
--- a/apps/api/audit-ci.jsonc
+++ b/apps/api/audit-ci.jsonc
@@ -9,6 +9,8 @@
"GHSA-mh29-5h37-fv8m|@jest/globals>@jest/expect>jest-snapshot>@jest/transform>babel-plugin-istanbul>@istanbuljs/load-nyc-config>js-yaml", // not impacted by this
"GHSA-36hm-qxxp-pg3m|@coinbase/x402>x402>wagmi>@wagmi/connectors>@coinbase/wallet-sdk>preact", // we don't use preact in our code paths
"GHSA-3vhc-576x-3qv4|@coinbase/x402>x402>wagmi>@wagmi/connectors>porto>hono", // we don't use hono
- "GHSA-f67f-6cw9-8mq4|@coinbase/x402>x402>wagmi>@wagmi/connectors>porto>hono" // we don't use hono
+ "GHSA-f67f-6cw9-8mq4|@coinbase/x402>x402>wagmi>@wagmi/connectors>porto>hono", // we don't use hono
+ "GHSA-73rr-hh4g-fpgx|git-diff>diff", // dev dependency for diffs, not processing user-supplied patches
+ "GHSA-73rr-hh4g-fpgx|ts-node>diff" // dev dependency for TypeScript execution, not processing user-supplied patches
]
}
diff --git a/apps/api/package.json b/apps/api/package.json
index 05d99a2f9..48aa78009 100644
--- a/apps/api/package.json
+++ b/apps/api/package.json
@@ -133,7 +133,7 @@
"tldts": "^6.1.75",
"tough-cookie": "^4.1.4",
"turndown": "^7.1.3",
- "undici": "^7.10.0",
+ "undici": "^7.18.2",
"uuid": "^13.0.0",
"winston": "^3.14.2",
"ws": "^8.18.0",
diff --git a/apps/api/pnpm-lock.yaml b/apps/api/pnpm-lock.yaml
index 9dc2c0b09..521a38232 100644
--- a/apps/api/pnpm-lock.yaml
+++ b/apps/api/pnpm-lock.yaml
@@ -129,7 +129,7 @@ importers:
version: 2.0.6
http-cookie-agent:
specifier: ^7.0.1
ioredis:
specifier: ^5.6.1
version: 5.6.1
@@ -206,8 +206,8 @@ importers:
specifier: ^7.1.3
version: 7.2.0
undici:
- specifier: ^7.10.0
- version: 7.10.0
+ specifier: ^7.18.2
+ version: 7.18.2
uuid:
specifier: ^13.0.0
version: 13.0.0
@@ -3812,10 +3812,6 @@ packages:
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
- resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==}
- engines: {node: '>= 0.4'}
-
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
engines: {node: '>= 0.4'}
@@ -4171,9 +4167,6 @@ packages:
resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==}
engines: {node: '>=14'}
- resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
-
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
engines: {node: '>= 0.4'}
@@ -6098,8 +6091,8 @@ packages:
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
- resolution: {integrity: sha512-u5otvFBOBZvmdjWLVW+5DAc9Nkq8f24g0O9oY7qw2JVIF1VocIFoyz9JFkuVOS2j41AufeO0xnlweJ2RLT8nGw==}
+ resolution: {integrity: sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==}
engines: {node: '>=20.18.1'}
@@ -6301,6 +6294,7 @@ packages:
resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==}
engines: {node: '>=18'}
+ deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation
resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==}
@@ -10970,9 +10964,9 @@ snapshots:
dependencies:
- es-define-property: 1.0.0
+ es-define-property: 1.0.1
es-errors: 1.3.0
- gopd: 1.0.1
+ gopd: 1.2.0
@@ -11122,10 +11116,6 @@ snapshots:
dependencies:
is-arrayish: 0.2.1
- dependencies:
- get-intrinsic: 1.3.0
-
@@ -11598,10 +11588,6 @@ snapshots:
- dependencies:
- get-intrinsic: 1.3.0
-
@@ -11648,7 +11634,7 @@ snapshots:
dependencies:
- es-define-property: 1.0.0
+ es-define-property: 1.0.1
@@ -11685,12 +11671,12 @@ snapshots:
domutils: 3.1.0
entities: 4.5.0
dependencies:
agent-base: 7.1.3
tough-cookie: 4.1.4
optionalDependencies:
- undici: 7.10.0
+ undici: 7.18.2
dependencies:
@@ -13417,7 +13403,7 @@ snapshots:
es-errors: 1.3.0
function-bind: 1.1.2
get-intrinsic: 1.3.0
- gopd: 1.0.1
+ gopd: 1.2.0
has-property-descriptors: 1.0.2
@@ -13840,7 +13826,7 @@ snapshots:
diff --git a/apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts b/apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts
index 597560258..3b0ad57e5 100644
--- a/apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts
@@ -2,6 +2,7 @@ import type { Socket } from "net";
import { config } from "../../../../config";
import type { TLSSocket } from "tls";
import * as undici from "undici";
+import { interceptors } from "undici";
import { CookieJar } from "tough-cookie";
import { cookie } from "http-cookie-agent/undici";
import IPAddr from "ipaddr.js";
@@ -19,11 +20,7 @@ export function isIPPrivate(address: string): boolean {
}
function createBaseAgent(skipTlsVerification: boolean) {
- const agentOpts: undici.Agent.Options = {
- maxRedirections: 5000,
- };
-
- return config.PROXY_SERVER
+ const baseAgent = config.PROXY_SERVER
? new undici.ProxyAgent({
uri: config.PROXY_SERVER.includes("://")
? config.PROXY_SERVER
@@ -34,14 +31,15 @@ function createBaseAgent(skipTlsVerification: boolean) {
requestTls: {
rejectUnauthorized: !skipTlsVerification, // Only bypass SSL verification if explicitly requested
},
- ...agentOpts,
})
: new undici.Agent({
connect: {
rejectUnauthorized: !skipTlsVerification, // Only bypass SSL verification if explicitly requested
},
- ...agentOpts,
});
+
+ // Add redirect interceptor for handling redirects
+ return baseAgent.compose(interceptors.redirect({ maxRedirections: 5000 }));
}
function attachSecurityCheck(agent: undici.Dispatcher) {
diff --git a/apps/js-sdk/audit-ci.jsonc b/apps/js-sdk/audit-ci.jsonc
index bc1459d79..1b48f8755 100644
--- a/apps/js-sdk/audit-ci.jsonc
+++ b/apps/js-sdk/audit-ci.jsonc
@@ -1,4 +1,7 @@
{
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
- "low": true
+ "low": true,
+ "allowlist": [
+ "GHSA-73rr-hh4g-fpgx|ts-node>diff" // dev dependency for TypeScript execution, not processing user-supplied patches
+ ]
}
\ No newline at end of file
diff --git a/apps/playwright-service-ts/audit-ci.jsonc b/apps/playwright-service-ts/audit-ci.jsonc
index bc1459d79..1b48f8755 100644
--- a/apps/playwright-service-ts/audit-ci.jsonc
+++ b/apps/playwright-service-ts/audit-ci.jsonc
@@ -1,4 +1,7 @@
{
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
- "low": true
+ "low": true,
+ "allowlist": [
+ "GHSA-73rr-hh4g-fpgx|ts-node>diff" // dev dependency for TypeScript execution, not processing user-supplied patches
+ ]
}
\ No newline at end of file