Repository navigation
fix: upgrade open to v11 to address GHSA-jgwm-4pmq-r4w4 - #952
Open
chetan2002 wants to merge 1 commit into
Open
chetan2002 wants to merge 1 commit into
chetan2002 wants to merge 1 commit into
Conversation
open@11 is ESM-only, so load it with a dynamic import at the call site.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
chetan2002
marked this pull request as ready for review
December 1, 2026 10:08
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.
Description
Upgrades
openfrom^8.4.2to^11.0.4.open@11is ESM-only, sorequire('open')no longer works: it throws ERR_REQUIRE_ESM on Node 20 and gives "open is not a function" on Node 22+. Each call site now loads it withconst { default: open } = await import('open'). This is the same pattern@adobe/aio-cli-plugin-consolealready uses.Changed:
app run:src/commands/app/run.js, 2 call sites.app deploy:src/commands/app/deploy.js.openwithjest.unstable_mockModule. The unit-test script already runs jest with--experimental-vm-modules.No behavior change: the same URLs are opened at the same points.
Related Issue
Security advisory GHSA-jgwm-4pmq-r4w4 (CVE-2026-119025). There is no separate issue in this repo.
Motivation and Context
openversions 7.2.0 through 10.x are affected by a command injection on Windows/WSL (PowerShell). The fix is only inopen@11; there is no backport to 8.x.The
@adobe/aio-clilockfile currently resolvesopen@8.4.2through this plugin. aio-cli can't drop the vulnerable version until this plugin is released withopen@11.The plugin's
enginesalready require Node>=20.17.0, whichopen@11(node >=20) supports, so this is not a breaking change.How Has This Been Tested?
Tested on macOS with Node 20.17.0, 22.23.4 and 24.22.3.
npm test: 943/943 unit tests pass with 100% coverage on all three Node versions.open(...)call makes therunanddeploytests fail.open@11, not mocked: I replaced the systemopenlauncher with a stub that records its arguments. It launched the expected URL.@adobe/aio-cli: I packed this plugin and installed it into aio-cli.open@8.4.2.aio app run --helpandaio app deploy --helpload.Known issue, also present on the base branch:
npm run lintfails on exactly Node 20.17.0, becauseneostandardis ESM-only and can't berequire()d. Lint passes on Node 22 and 24. CI uses the latest Node 20.x.Not tested: launching on actual Windows/WSL.
Screenshots (if appropriate):
Types of changes
Checklist:
opentests inrun.test.jsanddeploy.test.js.)