Skip to content

chore: reduce vulnerable build dependency exposure - #445

Merged
electrohyun merged 3 commits into
mainfrom
chore/harden-build-dependency-graph
Aug 27, 2026
Merged

electrohyun merged 3 commits into
mainfrom
chore/harden-build-dependency-graph

Conversation

@electrohyun

Copy link
Copy Markdown
Owner

Summary

Pins the vulnerable PostCSS and Nano ID ranges to compatible patched releases. The lockfile now contains one workspace document instead of the unused pnpm 11.19 package-manager graph; its six importers and 1,903 workspace package resolutions are otherwise unchanged apart from those two versions.

Adds a documentation pre-build gate for the unpatched [email protected] path used by Docusaurus. It rejects ICNS, JPEG XL, and HEIF signatures before Docusaurus runs, including compatible brands beyond the initial header, zero-sized boxes that extend to EOF, and files renamed with a supported extension. The remaining serialize-javascript, uuid, and esbuild advisories stay on their supported parent graphs instead of receiving incompatible major overrides.

This branch has the same reviewed tree as #432, replayed as the three relevant dependency-security commits on the latest main. It replaces #432 so the repository can use its normal rebase merge without replaying the already-landed lifecycle stack.

The latest-main CI run passes all 1,145 real/mock cases, Socket.IO 4.7 and 4.8, macOS/Windows/Linux, Chromium, documentation, package, conformance, coverage, and public-surface checks.

Related issue

Closes #431

Refs #432

Checklist

  • Tests added or updated
  • Behavior verified against real socket.io

@vercel

vercel Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smocket Ready Ready Preview Aug 27, 2026 1:52am

@github-actions github-actions Bot added chore Tooling, CI, and dependencies 📏 xl Pull request changes at least 1,000 lines labels Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c132550d-451d-44b7-9e45-abde8f3545cb

📥 Commits

Reviewing files that changed from the base of the PR and between 209a108 and 08a8980.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (4)
  • pnpm-workspace.yaml
  • scripts/check-doc-image-formats.mjs
  • scripts/check-doc-image-formats.test.ts
  • website/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change constrains vulnerable nanoid and postcss versions. It adds a documentation image scanner for ICNS, JPEG XL, and HEIF files. The website build runs this scanner before Docusaurus.

Changes

Build safety controls

Layer / File(s) Summary
Dependency version overrides
pnpm-workspace.yaml
The workspace forces matching nanoid and postcss ranges to patched versions.
Documentation image scanner
scripts/check-doc-image-formats.mjs
The scanner parses image headers, detects blocked formats by content, traverses documentation roots, and reports repository-relative paths.
Build integration and scanner validation
scripts/check-doc-image-formats.test.ts, website/package.json
Tests cover blocked signatures, renamed files, PNG acceptance, and extended HEIF boxes. The website build runs the scanner before Docusaurus.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 08a89

The dependency and documentation build changes are merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant WebsiteBuild
  participant findBlockedDocImages
  participant FileSystem
  participant Docusaurus
  WebsiteBuild->>findBlockedDocImages: scan documentation image roots
  findBlockedDocImages->>FileSystem: read image headers
  FileSystem-->>findBlockedDocImages: file bytes and paths
  findBlockedDocImages-->>WebsiteBuild: blocked records or success
  WebsiteBuild->>Docusaurus: build site when no blocked images exist
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The reviewable changes implement the PostCSS and Nano ID pins and add the required documentation image checks for ICNS, JPEG XL, HEIF, renamed files, extended compatible brands, and zero-sized boxes. … Review pnpm-lock.yaml and verify that the stale leading pnpm package-manager document was removed, importer and package counts are unchanged, and image-size, serialize-javascript, uuid, and esbuild remain on supported parent graphs without …
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the dependency-security objective and matches the main change.
Description check ✅ Passed The description directly covers the dependency pins, lockfile change, documentation image gate, linked issues, and validation results.
Out of Scope Changes check ✅ Passed The added dependency overrides, documentation image scanner, tests, and build integration all support the requirements in issue [#431]. No unrelated code changes are evident.
Full details: Linked Issues check

Explanation

The reviewable changes implement the PostCSS and Nano ID pins and add the required documentation image checks for ICNS, JPEG XL, HEIF, renamed files, extended compatible brands, and zero-sized boxes. Verification of the lockfile requirements and supported dependency graphs is inconclusive because pnpm-lock.yaml was excluded by the !**/pnpm-lock.yaml and !pnpm-lock.yaml path filters.

Resolution

Review pnpm-lock.yaml and verify that the stale leading pnpm package-manager document was removed, importer and package counts are unchanged, and image-size, serialize-javascript, uuid, and esbuild remain on supported parent graphs without incompatible overrides.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

@electrohyun
electrohyun merged commit ba3d614 into main Aug 27, 2026
17 checks passed
@electrohyun
electrohyun deleted the chore/harden-build-dependency-graph branch August 27, 2026 01:56
@electrohyun electrohyun self-assigned this Aug 27, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in smocket Aug 27, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in smocket Aug 27, 2026

This branch was successfully deployed

1 active deployment
Preview — 08a89800 Deployed Aug 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Tooling, CI, and dependencies 📏 xl Pull request changes at least 1,000 lines

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore: reduce vulnerable build dependency exposure

1 participant