Repository navigation
fix(deps): replace proxy-agent to drop basic-ftp (CVE-2026-102990) - #19
Merged
Merged
Conversation
proxy-agent always installs pac-proxy-agent -> get-uri -> basic-ftp, and even the latest get-uri still requires basic-ftp ^5, which is vulnerable to CVE-2026-102990. Consumers of @revopush/code-push inherited it with no way to fix it from their side. We only ever pass a fixed proxy URL, so use the concrete agents directly, selected the same way proxy-agent did: http(s) proxies use HttpProxyAgent/HttpsProxyAgent depending on the target, socks* proxies use SocksProxyAgent. Same majors proxy-agent 6.5 resolved, so Node support is unchanged. PAC proxy URLs (pac+...) are no longer supported. Bump version to 4.6.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- superagent keeps the agent across redirects, so an http -> https redirect would go through HttpProxyAgent; re-pick on "redirect". - Build the http/https agents once per RequestManager instead of per call. - Add tests for proxy agent selection, reuse and PAC rejection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping PAC proxy URL support is a behaviour change, so release it as a minor rather than a patch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Bumped the version to 4.7.0 instead of 4.6.1 (b399256). Dropping PAC proxy URL support is a behaviour change, so this ships as a minor rather than a patch. The description's references to 4.6.1, including the "After merge" step, should read 4.7.0. Re-verified on b399256:
🤖 Generated with Claude Code |
- Strip username/password from the unsupported-protocol error, since the CLI prints it. - Add a test with a local proxy that checks an http -> https redirect re-picks the agent (fails without the redirect listener). - Narrow the try block to the call that can throw; tighten comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Review pass on 3335cfb: simplifier, Fixed
Not changed
Verification
🤖 Generated with Claude Code |
new URL() throws before the credential stripping runs, and older Node versions include the whole input in that error message. Replace it with a generic "Invalid proxy URL" error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashirman
approved these changes
Oct 6, 2026
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.
Why
proxy-agentalways installspac-proxy-agent → get-uri → basic-ftp. Even the latestget-uristill requiresbasic-ftp ^5, which is vulnerable to CVE-2026-102990 (<= 6.2.0). Every consumer of@revopush/code-push, such as react-native-code-push-next, inherits the alert and can't fix it from their side.What
RequestManageronly ever passes a single fixed proxy URL (getProxyForUrl: () => this._proxy), so it doesn't needproxy-agent's resolution logic. It now builds the specific agent directly, chosen the same wayproxy-agent6.5 did:http:///https://HttpProxyAgenthttp:///https://HttpsProxyAgentsocks://,socks4(a)://,socks5(h)://SocksProxyAgentThese are the same major versions
proxy-agent6.5 already installed (http-proxy-agent@7,https-proxy-agent@7,socks-proxy-agent@8), so Node support (>=14) is unchanged.Behaviour change: PAC proxy URLs (
pac+http://…etc.) are no longer supported. They now reject withUnsupported protocol for proxy URL, the same messageproxy-agentused for unknown protocols.The version is bumped to 4.6.1.
Verification
npm ls basic-ftp get-uri pac-proxy-agent proxy-agentreturns empty.npm run build:releasepasses.npm test: 50 passing, 1 failing (Acquisition SDK › disables api calls on unsuccessful response). It fails the same way on master, so this change didn't cause it.GET http://…), an HTTPS target was tunnelled (CONNECT registry.npmjs.org:443), andpac+http://rejected with aCodePushError.After merge
Publish 4.6.1, then bump
@revopush/code-pushto 4.6.1 in react-native-code-push-next and drop thebasic-ftpoverride from revopush/react-native-code-push-next#64.🤖 Generated with Claude Code