Skip to content

Fix the failing security audit: bump socket.io-parser and run on Node 24 - #274

Closed
daniellekorn wants to merge 1 commit into
mainfrom
sdk-audit-fix
Closed

Fix the failing security audit: bump socket.io-parser and run on Node 24#274
daniellekorn wants to merge 1 commit into
mainfrom
sdk-audit-fix

Conversation

@daniellekorn

@daniellekorn daniellekorn commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

The Security Audit / npm audit (dependencies) check has failed on main since 2026-09-01, so it currently blocks every open PR.

There are two independent causes. Fixing either one alone leaves the job red.

Cause 1: a retired registry endpoint

npm 10, which ships with Node 20, calls the legacy quick-audit endpoint. The registry is retiring it and now answers 400:

npm notice This endpoint is being retired. Use the bulk advisory endpoint instead.
npm warn audit 400 Bad Request - POST .../security/audits/quick
npm error audit endpoint returned an error

npm exits 1 before evaluating a single advisory, so this fails whether or not the project has a vulnerability. I confirmed that by pushing the dependency fix on its own first: the job still failed, with an identical log and nothing about socket.io-parser.

npm 11 uses the bulk advisory endpoint. Node 24 is already what manual-publish and preview-publish run, and it is what .npmrc calls for, since min-release-age needs npm >= 11.10.0 and is silently ignored on npm 10. This workflow and lint/unit-tests were the remaining ones on 20.x.

Cause 2: a real high-severity vulnerability

With a working endpoint, the audit fails for a legitimate reason:

$ npm audit --omit=dev --audit-level=high
socket.io-parser  4.0.0 - 4.2.6
Severity: high
Socket.IO: Zero-attachment Memory Exhaustion - GHSA-2m8v-j782-fhvr
$ echo $?
1

The path is production, so --omit=dev does not skip it:

@base44/sdk → socket.io-client@4.8.3 → socket.io-parser@4.2.6

socket.io-client@4.8.3 declares socket.io-parser: ~4.2.4, and the patched 4.2.7 is already inside that range, so this is a lockfile refresh only. No package.json change, no declared range change, no major or minor bump of any direct dependency.

-      "version": "4.2.6",
-      "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.6.tgz",
-      "integrity": "sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg==",
+      "version": "4.2.7",
+      "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.7.tgz",
+      "integrity": "sha512-IH/iSeO9T6gz1KkFleGDWkG9N3dl4jXVYUtMhIqH10Md0ttMer8nUNWiP1DKuNrybD2xBrixLJdCC9J6ECoYkg==",

Verification

  • npm audit --omit=dev --audit-level=high reports 0 vulnerabilities and exits 0 locally
  • The integrity hash was checked by hashing the tarball rather than trusting the registry response, and it matches
  • The resolved URL is normalised to registry.npmjs.org. npm update had written an internal Wix registry URL, which would have been the only such entry among 393

The Node bump cannot be reproduced locally, because registry.npmjs.org is not reachable from a Wix network and a local run therefore goes through a proxy that does not exhibit the fault. It is verified by this job.

Follow-up, not done here

lint and unit-tests are still on Node 20.x while the publish workflows are on 24. Worth aligning, but it is a behaviour change for those jobs and does not belong in a fix for a red audit.

The Security Audit workflow has failed on main since 2026-09-01. Two
things were stacked: npm's quick audit endpoint is being retired and
returns 400 in CI, which masked the fact that the audit legitimately fails
underneath.

socket.io-parser 4.2.6 carries a high-severity memory exhaustion advisory
(GHSA-2m8v-j782-fhvr, range 4.0.0 - 4.2.6). It reaches us through
socket.io-client, which is a production dependency, so npm audit --omit=dev
does not skip it and the gating step exits 1.

socket.io-client 4.8.3 declares socket.io-parser ~4.2.4, so 4.2.7 is
already in range. This refreshes the lockfile entry only. No package.json
change, no version range change, no major bump.

The tarball integrity was verified independently by hashing it rather than
trusting the registry response, and the resolved URL is normalised to
registry.npmjs.org so all 393 entries stay on one host.

npm audit --omit=dev --audit-level=high now reports 0 vulnerabilities and
exits 0.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.46-pr.274.c9536b0

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.46-pr.274.c9536b0"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.46-pr.274.c9536b0"
  }
}

Preview published to npm registry — try new features instantly!

@daniellekorn daniellekorn changed the title Bump socket.io-parser to 4.2.7 to clear the failing security audit Fix the failing security audit: bump socket.io-parser and run on Node 24 Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant