-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Snyk] Security upgrade codemirror from 5.65.16 to 6.0.0 #23305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…a-ui/src/main/resources/ui/yarn.lock to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-CODEMIRROR-10494092
🔍 CI failure analysis for 4b90a09: All 7 CI failures (6 playwright jobs + ui-coverage-tests) caused by incomplete CodeMirror 5→6 migration. The v5 addon system no longer exists in v6.IssueAll CI jobs failing with identical module resolution errors during build and test phases. Root CauseThe Snyk security fix upgraded CodeMirror from 5.65.16 to 6.0.0 (commit The PR only updated DetailsAll Failed Jobs (7 total): Playwright CI - Build failures during Vite bundling:
UI Coverage Tests - Test suite import failures:
Common Error: Affected Files (5 files with v5 addon imports):
Breaking Imports: import 'codemirror/addon/edit/closebrackets.js'; // ❌ Not in v6
import 'codemirror/addon/edit/matchbrackets.js'; // ❌ Not in v6
import 'codemirror/addon/fold/brace-fold'; // ❌ Not in v6
import 'codemirror/addon/fold/foldgutter.js'; // ❌ Not in v6
import 'codemirror/addon/selection/active-line'; // ❌ Not in v6
import 'codemirror/addon/runmode/runmode'; // ❌ Not in v6Additional Blocker: Architecture Change:
Code Review 🚫 Blocked 0 resolved / 1 findingsSecurity fix upgrades CodeMirror 5→6 to address ReDoS vulnerability, but this is a breaking change that requires application code migration. Without updating existing CM5 usage in the codebase, this will likely cause runtime failures. 🚨 Bug: CodeMirror 5→6 major version upgrade may break existing code📄 openmetadata-ui/src/main/resources/ui/package.json:93 🔗 CodeMirror 5 to 6 Migration Guide 🔗 SNYK-JS-CODEMIRROR-10494092 This PR upgrades CodeMirror from version 5.65.16 to 6.0.0, which is a major version breaking change. CodeMirror 6 has a completely different architecture and API from version 5: Breaking changes include:
The PR only updates the dependency version without any application code changes. Any existing code using CodeMirror's CM5 API will likely fail at runtime with errors like Recommended action:
Note: The Snyk metadata explicitly flags Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
| "axios": "1.12.0", | ||
| "classnames": "^2.3.1", | ||
| "codemirror": "^5.65.16", | ||
| "codemirror": "^6.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 Bug: CodeMirror 5→6 major version upgrade may break existing code
Details
This PR upgrades CodeMirror from version 5.65.16 to 6.0.0, which is a major version breaking change. CodeMirror 6 has a completely different architecture and API from version 5:
Breaking changes include:
- CM5 uses a single monolithic package; CM6 uses modular
@codemirror/*scoped packages - Different editor instantiation: CM5's
CodeMirror()constructor vs CM6'sEditorViewclass - Different state management: CM5 uses imperative API vs CM6's immutable state model
- Different extension/plugin system
- Different DOM structure and styling approach
The PR only updates the dependency version without any application code changes. Any existing code using CodeMirror's CM5 API will likely fail at runtime with errors like CodeMirror is not a constructor or similar.
Recommended action:
- Search the codebase for existing CodeMirror usage (e.g., imports from 'codemirror', CodeMirror editor instances)
- Either:
- Update application code to use the CM6 API (migration guide), OR
- If extensive changes are needed, consider whether a minor security patch for CM5 is available instead
Note: The Snyk metadata explicitly flags "isBreakingChange": true for this upgrade.
Was this helpful? React with 👍 / 👎
Snyk has created this PR to fix 1 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
openmetadata-ui/src/main/resources/ui/package.jsonopenmetadata-ui/src/main/resources/ui/yarn.lockNote for zero-installs users
If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the
.yarn/cache/directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to runyarnto update the contents of the./yarn/cachedirectory.If you are not using zero-install you can ignore this as your flow should likely be unchanged.
Vulnerabilities that will be fixed with an upgrade:
SNYK-JS-CODEMIRROR-10494092
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Regular Expression Denial of Service (ReDoS)
Summary by Gitar
@codemirror/*scoped package structure (adds 10+ new dependencies including Lezer parser system)This will update automatically on new commits.