[Snyk] Fix for 2 vulnerabilities#10606
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-DIFF-14917201 - https://snyk.io/vuln/SNYK-JS-BACKSTAGEBACKENDPLUGINAPI-15054291
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ 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. |
There was a problem hiding this comment.
Walkthrough
This PR updates dependencies in the ADR plugin package, focusing on markdown rendering libraries and internal Backstage dependencies. The changes include upgrading react-markdown from version 8 to 9 and remark-gfm from version 3 to 4, both representing major version bumps that may introduce breaking changes or new features. Additionally, the @backstage/plugin-search-react dependency is changed from a workspace protocol reference to a pinned version 0.1.0, suggesting a move towards using a stable, published version rather than a local workspace dependency. These updates align the plugin with newer library versions and may improve markdown rendering capabilities.
Changes
| File(s) | Summary |
|---|---|
plugins/adr/package.json |
Updated three dependencies: pinned @backstage/plugin-search-react to version 0.1.0 (from workspace protocol), upgraded react-markdown from ^8.0.0 to ^9.0.0, and upgraded remark-gfm from ^3.0.1 to ^4.0.0. |
Sequence Diagram
This diagram shows the interactions between components:
sequenceDiagram
participant User
participant ADRPlugin as ADR Plugin
participant SearchReact as Search React (v0.1.0)
participant ReactMarkdown as React Markdown (v9.0.0)
participant RemarkGFM as Remark GFM (v4.0.0)
User->>ADRPlugin: Request ADR document
alt Search-based ADR discovery
ADRPlugin->>SearchReact: Query for ADRs
SearchReact-->>ADRPlugin: Return ADR results
end
ADRPlugin->>ADRPlugin: Fetch ADR content (markdown)
Note over ADRPlugin,ReactMarkdown: Markdown rendering with upgraded dependencies
ADRPlugin->>ReactMarkdown: Render markdown content
activate ReactMarkdown
ReactMarkdown->>RemarkGFM: Process GFM syntax<br/>(tables, strikethrough, task lists)
activate RemarkGFM
RemarkGFM-->>ReactMarkdown: Transformed AST
deactivate RemarkGFM
ReactMarkdown-->>ADRPlugin: Rendered HTML components
deactivate ReactMarkdown
ADRPlugin-->>User: Display formatted ADR
Note over ReactMarkdown,RemarkGFM: Upgraded to v9 and v4<br/>for improved markdown support
Install the extension
Note for Windsurf
Please change the default marketplace provider to the following in the windsurf settings:Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery
Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items
Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below
Emoji Descriptions:
⚠️ Potential Issue - May require further investigation.- 🔒 Security Vulnerability - Fix to ensure system safety.
- 💻 Code Improvement - Suggestions to enhance code quality.
- 🔨 Refactor Suggestion - Recommendations for restructuring code.
- ℹ️ Others - General comments and information.
Interact with the Bot:
- Send a message or request using the format:
@entelligenceai + *your message*
Example: @entelligenceai Can you suggest improvements for this code?
- Help the Bot learn by providing feedback on its responses.
@entelligenceai + *feedback*
Example: @entelligenceai Do not comment on `save_auth` function !
Also you can trigger various commands with the bot by doing
@entelligenceai command
The current supported commands are
config- shows the current configretrigger_review- retriggers the review
More commands to be added soon.
| "@backstage/plugin-adr-common": "workspace:^", | ||
| "@backstage/plugin-catalog-react": "workspace:^", | ||
| "@backstage/plugin-search-common": "workspace:^", | ||
| "@backstage/plugin-search-react": "workspace:^", | ||
| "@backstage/plugin-search-react": "0.1.0", | ||
| "@backstage/theme": "workspace:^", | ||
| "@material-ui/core": "^4.12.2", | ||
| "@material-ui/icons": "^4.9.1", | ||
| "@material-ui/lab": "4.0.0-alpha.61", | ||
| "@types/react": "^16.13.1 || ^17.0.0", | ||
| "lodash": "^4.17.21", | ||
| "react-markdown": "^8.0.0", | ||
| "react-markdown": "^9.0.0", | ||
| "react-use": "^17.2.4", | ||
| "remark-gfm": "^3.0.1" | ||
| "remark-gfm": "^4.0.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "^16.13.1 || ^17.0.0", |
There was a problem hiding this comment.
Correctness: @backstage/plugin-search-react changed from workspace:^ to pinned 0.1.0, breaking monorepo dependency pattern and preventing workspace updates. react-markdown major bump ^8.0.0 → ^9.0.0 introduces breaking API changes (component props, children handling) that will cause runtime failures if existing markdown rendering code is incompatible.
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
File: plugins/adr/package.json, lines 36-43
Problem: Two critical dependency issues:
1. `@backstage/plugin-search-react` changed from `workspace:^` to pinned `0.1.0`, breaking monorepo consistency
2. `react-markdown` upgraded from v8 to v9 (major version) without verification of breaking changes
Fix instructions:
1. Revert `@backstage/plugin-search-react` to `workspace:^` to maintain monorepo pattern
2. Revert `react-markdown` to `^8.0.0` and `remark-gfm` to `^3.0.1`
3. If upgrades are necessary, create a separate PR that:
- Documents the breaking changes in react-markdown v9
- Updates all markdown rendering code to handle new API
- Adds tests to verify compatibility
- Explains why plugin-search-react needs pinning (if truly required)
✨ Committable Code Suggestion
💡 This is a one-click fix! Click "Commit suggestion" to apply this change directly to your branch.
| "@backstage/plugin-adr-common": "workspace:^", | |
| "@backstage/plugin-catalog-react": "workspace:^", | |
| "@backstage/plugin-search-common": "workspace:^", | |
| "@backstage/plugin-search-react": "workspace:^", | |
| "@backstage/plugin-search-react": "0.1.0", | |
| "@backstage/theme": "workspace:^", | |
| "@material-ui/core": "^4.12.2", | |
| "@material-ui/icons": "^4.9.1", | |
| "@material-ui/lab": "4.0.0-alpha.61", | |
| "@types/react": "^16.13.1 || ^17.0.0", | |
| "lodash": "^4.17.21", | |
| "react-markdown": "^8.0.0", | |
| "react-markdown": "^9.0.0", | |
| "react-use": "^17.2.4", | |
| "remark-gfm": "^3.0.1" | |
| "remark-gfm": "^4.0.0" | |
| }, | |
| "peerDependencies": { | |
| "react": "^16.13.1 || ^17.0.0", | |
| "@backstage/integration-react": "workspace:^", | |
| "@backstage/plugin-adr-common": "workspace:^", | |
| "@backstage/plugin-catalog-react": "workspace:^", | |
| "@backstage/plugin-search-common": "workspace:^", | |
| "@backstage/plugin-search-react": "workspace:^", | |
| "@backstage/theme": "workspace:^", | |
| "@material-ui/core": "^4.12.2", | |
| "@material-ui/icons": "^4.9.1", | |
| "@material-ui/lab": "4.0.0-alpha.61", | |
| "@types/react": "^16.13.1 || ^17.0.0", | |
| "lodash": "^4.17.21", | |
| "react-markdown": "^8.0.0", | |
| "react-use": "^17.2.4", | |
| "remark-gfm": "^3.0.1" | |
| }, | |
| "peerDependencies": { | |
| "react": "^16.13.1 || ^17.0.0", |
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Snyk has created this PR to fix 2 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
plugins/adr/package.jsonNote 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-DIFF-14917201
SNYK-JS-BACKSTAGEBACKENDPLUGINAPI-15054291
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)
EntelligenceAI PR Summary
This PR upgrades markdown rendering dependencies and stabilizes the search plugin dependency in the ADR plugin package.
@backstage/plugin-search-reactfrom workspace protocol to pinned version0.1.0react-markdownfrom^8.0.0to^9.0.0(major version bump)remark-gfmfrom^3.0.1to^4.0.0(major version bump)plugins/adr/package.json