Repository navigation
fix(deps): upgrade open to 11 in cli-utilities for SNYK-JS-OPEN-22112123 (DX-32699) - #2748
Merged
Merged
Conversation
…123 (DX-32699) open@8.4.2 has SNYK-JS-OPEN-22112123 (High); the fix exists only in open 11+. - cli-utilities: open ^8.4.2 -> ^11.0.4. open 9+ is ESM-only, so auth-handler loads it with a dynamic import in a new openInBrowser(), the same way chalk.ts loads chalk 5. Tests now cover that path. - contentstack: drop the open dependency; nothing in the package uses it. - Add a pnpm override to open 11.0.4: the bundled plugins still pull in the published cli-utilities 2.0.2 until they are re-released. - Regenerate pnpm-lock.yaml with pnpm 10.28.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
reeshika-h
approved these changes
Dec 4, 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.
What was wrong
@contentstack/cli-utilitiesdepends onopen@^8.4.2, which has SNYK-JS-OPEN-22112123 (High, CVSS 8.5, past its 30-day SLA). The fix exists only inopen11.0.0 and later; there is no patched 8.x release.openis used in one place:auth-handler.tsopens the OAuth authorize page in the browser forcsdx auth:login --oauth.Jira: DX-32699. cli-plugins already has a temporary override for the same finding (cli-plugins#393, DX-32702); this is the source fix.
What this PR changes
contentstack-utilities:open^8.4.2→^11.0.4.open9+ is ESM-only and this package compiles to CommonJS, soopenOAuthURL()now calls a newopenInBrowser(url), which doesawait import('open'). That's the same patternsrc/chalk.tsalready uses for chalk 5.openOAuthURLtests now stubopenInBrowserand assert on it (they used to stubglobal.openand swallow errors), and they cover the error path.contentstack(the root CLI): removed theopendependency. Nothing in the package imports it.pnpm-workspace.yaml: addsopen: 11.0.4tooverrides. The bundled plugins still depend on the publishedcli-utilities@2.0.2(withopen8) until they're re-released. Remove this once they are.pnpm-lock.yaml: deleted and regenerated with the pinned pnpm 10.28.0. It contains onlyopen@11.0.4.No new Node requirement:
open11 needs Node 20+, and loading ESM this way needs Node 22.12+, which the CLI already relies on for chalk 5.How it was tested
auth-handler.jsloadsopen11 and gets a workingopen()function.csdx --versionstill works.csdx auth:login --oauthon macOS (Node 24.22) with this build: the browser opened by itself, and both the auth code and the access token were fetched.snyk test --all-projects: noopenfindings.Notes
security-scamay still fail ontar@7.5.24. It reaches this repo through the publishedcli-cm-bootstrap/cli-cm-seed2.0.2. tar 8 is fixed in cli-plugins#393 (DX-34589); once those plugins are released, bumping them here clears it. An override can't be used for tar: tar 8 removed the stream API that the published 2.0.2 code uses.SKIP_HOOK=1), because its Snyk step fails on findings this PR doesn't touch (tar, minimatch, picomatch, csv-parse, qs, yarn). Talisman passed on the same changes.🤖 Generated with Claude Code