[agent] chore(deps): bump yargs-parser to >=5.0.1 via npm overrides#726
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
Addresses GHSA-p9pc-299p-vxgp (CVE-2020-7608): yargs-parser prototype pollution vulnerability in versions <= 5.0.0. The vulnerable yargs-parser@2.4.1 was a transitive dependency pulled in through gce-ips@1.0.2 -> yargs@4.x -> yargs-parser@^2.4.1. The gce-ips package (latest: 1.0.2) has not shipped an update to fix this transitive dependency, so a targeted npm override is used. Note: gce-ips is a dev-only dependency and its index.js does not import yargs at all (yargs is only used in the CLI binary, not the module). The update-cidrs.ts script imports gce-ips as a module, so there is no runtime impact from overriding yargs-parser in this chain. Fixes Dependabot alert #18. Co-authored-by: Copilot <223556219+Copilot@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.
Summary
Addresses Dependabot alert #18: GHSA-p9pc-299p-vxgp / CVE-2020-7608 — yargs-parser Vulnerable to Prototype Pollution (CVSS 5.3 medium).
Root cause
yargs-parser@2.4.1(vulnerable range:<= 5.0.0) was installed as a transitive dependency via:Why
overrideswas usedThe
gce-ipspackage is stuck at version 1.0.2 (the only published version) and has not shipped a release with an updatedyargsdependency. Since the direct dependency maintainer has not published a fix, a targeted npmoverridesentry was added per policy.Changes
package.json: Added"overrides": { "gce-ips>yargs>yargs-parser": ">=5.0.1" }to force the patched version.package-lock.json: Updated the nestednode_modules/gce-ips/node_modules/yargs-parserentry from2.4.1to5.0.1(and updated itsdependenciesfromlodash.assigntoobject.assign, as changed in 5.x).Impact assessment
gce-ipsis a dev-only dependency used in theupdate-cidrs.tsscript. Crucially,gce-ips/index.jsdoes not importyargs— yargs is only used in the CLI binary (bin/gce-ips.js). Theupdate-cidrs.tsscript importsgce-ipsas a module, so there is no runtime impact from overridingyargs-parserin this chain.