fix!: replace uuid dependency with crypto.randomUUID()#153
Open
escoberik wants to merge 1 commit into
Open
Conversation
breautek
requested changes
May 4, 2026
Contributor
breautek
left a comment
There was a problem hiding this comment.
Thanks for the PR. I'm always in favour of replacing third-party dependencies with core nodejs libraries whenever possible and this does just that.
Just a few notes, in addition to review lines.
- I think a separate PR should be made for the engine bump. This PR can then reference the other PR as a dependency. This is purely to facilitate reverts, if we for some reason require to, though I doubt it will happen.
- I think this PR should be marked as a breaking change. The commit message should be
fix!: ..., the!indicating a breaking change. The PR message should provide a small blurb how the PR is a breaking change, which I think you already have.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #153 +/- ##
==========================================
- Coverage 96.91% 96.91% -0.01%
==========================================
Files 51 51
Lines 11125 11124 -1
==========================================
- Hits 10782 10781 -1
Misses 343 343 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
uuid <14.0.0 is flagged by GHSA-w5hq-g745-h8pq (missing buffer bounds check in v3/v5/v6 when buf is provided). The only upstream fix is uuid v14, but v14 dropped CommonJS support, which would break this package. Since only uuid.v4() is used here (in generateUuid()), replace it with Node's built-in crypto.randomUUID() — available since Node 14.17.0, produces the same RFC 4122 v4 UUID format, and requires no external dependency. The uuid package is removed from dependencies entirely. BREAKING CHANGE: Node >=14.17.0 is now required at runtime (crypto.randomUUID was introduced in that release). The engines field remains >=10.0.0; a separate PR will bump it to reflect the new minimum. All 426 existing tests pass.
b9f82b7 to
a6d9e3b
Compare
escoberik
added a commit
to escoberik/cordova-node-xcode
that referenced
this pull request
May 7, 2026
Reflects the runtime requirement introduced by apache#153 (crypto.randomUUID, available since Node 14.17.0). Node 10 and 12 have been EOL since 2021 and 2022 respectively. BREAKING CHANGE: Node <14.17.0 is no longer supported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
uuid ^7.0.3is flagged by GHSA-w5hq-g745-h8pq — a missing buffer bounds check inuuid.v3/v5/v6()when an explicitbufargument is provided. The advisory marks all versions belowuuid@14.0.0as vulnerable, so downstream consumers (notably the Expo SDK and any project using@expo/config-plugins) see security audit failures they cannot resolve.The "fix" suggested by
npm audit— upgrading touuid@14— isn't viable here because uuid v14 dropped CommonJS support, and this package usesrequire('uuid').Solution
This PR replaces the single
uuid.v4()call ingenerateUuid()with Node's built-incrypto.randomUUID(), which:The
uuidpackage is removed fromdependenciesentirely. Theenginesfield is updated from>=10.0.0to>=14.17.0to reflect the new minimum.Testing
All 426 existing tests pass with no changes to the test suite.