Skip to content

chore: replace serve with http-server in CI smoke test - #334

Merged
daedalist merged 1 commit into
mainfrom
chore/replace-serve-with-http-server
Oct 26, 2026
Merged

daedalist merged 1 commit into
mainfrom
chore/replace-serve-with-http-server

Conversation

@daedalist

Copy link
Copy Markdown
Owner

Summary

Closes Dependabot alert #161 (CVE-2026-87776, high): a zlib memory leak in compression < 1.8.2 when a client aborts a compressed response.

The only path to compression was serve, which pins it to exactly 1.8.1. Dependabot cannot move a transitive dependency past an exact pin, and the upstream fix (vercel/serve#868) has no release date, so the alert would otherwise sit open indefinitely.

The test-deployment job only starts a server for a few seconds and curls / and /index.html. http-server is already a pinned devDependency used by npm run test:github-pages, so this switches the job to it and removes serve entirely. One static server instead of two, and the alert closes with the dependency.

Reachability note: the vulnerable code never ran outside that CI step. The live site is served by GitHub Pages.

Changes

  • .github/workflows/pr-ci.yml: start ./node_modules/.bin/http-server ./build -p 8080 instead of serve ./build -l 8080; comments updated to match.
  • package.json / package-lock.json: npm uninstall serve. compression is gone from the lockfile.
  • CONTRIBUTING.md, .claude/CLAUDE.md: the "CI Tooling Must Be Pinned" write-up now points at http-server and records why serve was dropped.

Test plan

  • npm run build, then the workflow's exact http-server command: responding after 2s, / and /index.html both return 200
  • prettier --check on the edited files
  • npm ls clean with serve absent
  • test-deployment job passes on this PR
  • Dependabot alert chore(deps-dev): bump jsdom from 28.1.0 to 29.0.0 #161 shows as fixed after merge

🤖 Generated with Claude Code

Dependabot alert #161 (CVE-2026-87776, high) is a zlib memory leak in
compression < 1.8.2. The only path to it was serve, which pins
compression to exactly 1.8.1, so Dependabot cannot bump it and the
upstream fix (vercel/serve#868) has no release date.

The test-deployment job only needs to serve two static files to curl.
http-server is already a pinned devDependency used by the npm scripts,
so switch the job to it and drop serve entirely. The alert closes with
the dependency instead of waiting on upstream.

Verified locally: built the site, started http-server on 8080 with the
workflow's command, and both / and /index.html returned 200.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@daedalist
daedalist merged commit abed481 into main Oct 26, 2026
14 checks passed
@daedalist
daedalist deleted the chore/replace-serve-with-http-server branch October 26, 2026 05:11
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