Skip to content

fix: replace uuid dependency with crypto.randomBytes - #1139

Open
piotrekwitkowski wants to merge 1 commit into
GoogleChrome:mainfrom
piotrekwitkowski:fix/remove-uuid-dependency
Open

fix: replace uuid dependency with crypto.randomBytes#1139
piotrekwitkowski wants to merge 1 commit into
GoogleChrome:mainfrom
piotrekwitkowski:fix/remove-uuid-dependency

Conversation

@piotrekwitkowski

Copy link
Copy Markdown

Summary

  • Removes the uuid package from @lhci/cli and @lhci/server to eliminate GHSA-w5hq-g745-h8pq (moderate severity, uuid <14.0.0)
  • Adds a generateUUID() utility in @lhci/utils/src/uuid.js using crypto.randomBytes with manual UUID v4 bit formatting
  • Compatible with Node 18 (no dependency on crypto.randomUUID which requires Node 19+)

Related

Test plan

  • yarn jest packages/server/test/api/storage/storage-method.test.js passes
  • yarn jest packages/utils/test passes (pre-existing failures in build-context.test.js are unrelated)

@google-cla

google-cla Bot commented Apr 29, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Remove the uuid package to eliminate GHSA-w5hq-g745-h8pq (moderate
severity, uuid <14.0.0). Uses crypto.randomBytes with manual UUID v4
formatting, compatible with Node 18+.
@piotrekwitkowski
piotrekwitkowski force-pushed the fix/remove-uuid-dependency branch from bbb46ef to c634b2d Compare April 29, 2026 02:31
@deborahgu

Copy link
Copy Markdown

Hi, I'm wondering if this is likely to get merged? I was going to submit a PR to bump uuid, but if it's just going to be removed I won't bother.

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.

2 participants