Conversation
ashishrp-aws
approved these changes
Feb 21, 2026
…lnerable ansi-regex Remove registry-js dependency to eliminate transitive ansi-regex@2.1.1 vulnerability (CVE-2021-3807). Replace with direct calls to Windows reg query command, which reads the same registry values without requiring a native addon or its heavy dependency tree.
3275c16 to
884a2ca
Compare
laileni-aws
approved these changes
Mar 3, 2026
chungjac
pushed a commit
that referenced
this pull request
Mar 9, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>language-server-runtimes: 0.3.15</summary> ## [0.3.15](language-server-runtimes/v0.3.14...language-server-runtimes/v0.3.15) (2026-03-09) ### Bug Fixes * **runtimes:** replace mac-ca with native macOS certificate reading ([#736](#736)) ([134d721](134d721)) * **runtimes:** replace registry-js with native reg query to remove vu… ([#737](#737)) ([a92164a](a92164a)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Remove registry-js dependency to eliminate transitive
ansi-regex@2.1.1vulnerability (CVE-2021-3807). Replace with direct calls to Windowsreg querycommand, which reads the same registry values without requiring a native addon or its heavy dependency tree.Problem
registry-js@1.16.1depends onprebuild-install@^5.3.5→npmlog→gauge→strip-ansi→ansi-regex@2.1.1(CVE-2021-3807, CVSS 7.5).The existing
prebuild-installoverride in the rootpackage.jsononly works locally — npm overrides do not propagate to downstream consumers.registry-jshas not been updated in 2+ years.This was previously fixed in v0.3.10 (PR #719) but re-introduced in v0.3.12.
Solution
Replace
registry-jswith the built-in Windowsreg querycommand viachild_process.spawnSync. This reads the same registry values (ProxyEnable,ProxyServer,ProxyOverride) without any external dependencies.Changes:
runtimes/runtimes/util/standalone/getProxySettings/getWindowsProxySettings.ts— replacedregistry-jsimport with nativespawnSync('reg', ...)callsruntimes/package.json— removedregistry-jsfrom dependenciespackage-lock.json— regenerated (removed 30 packages)Testing:
npm run compile✅npm run test— 33/33 passing ✅npm run check:formatting✅npm list registry-js— empty ✅ansi-regex@2.xin dependency tree ✅test-windowsjob will validate thereg queryapproach on actual WindowsLicense
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.