[Snyk] Fix for 4 vulnerabilities#10545
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 - https://snyk.io/vuln/SNYK-JS-LODASH-15053838 - https://snyk.io/vuln/SNYK-JS-LODASHES-15053836
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
⛔ Snyk checks have failed. 1 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 dependency management in the home plugin's package.json file. The changes transition two Backstage internal dependencies from workspace protocol references to specific published versions (0.1.0), indicating a move away from local workspace linking to versioned package consumption. Additionally, the lodash dependency receives a minor version bump from 4.17.21 to 4.17.23, which typically includes security patches and bug fixes. These changes standardize dependency versioning and ensure the plugin uses stable, published versions of its dependencies.
Changes
| File(s) | Summary |
|---|---|
plugins/home/package.json |
Updated @backstage/core-components and @backstage/plugin-home-react dependencies from workspace protocol to version 0.1.0; bumped lodash from ^4.17.21 to ^4.17.23. |
Sequence Diagram
This diagram shows the interactions between components:
sequenceDiagram
participant PM as Package Manager
participant Home as @backstage/plugin-home
participant CoreComp as @backstage/core-components
participant HomeReact as @backstage/plugin-home-react
participant Lodash as lodash
Note over PM,Lodash: Dependency Resolution Process
PM->>Home: Install dependencies
Home->>CoreComp: Require v0.1.0 (pinned)
CoreComp-->>Home: Provide package
Home->>HomeReact: Require v0.1.0 (pinned)
HomeReact-->>Home: Provide package
Home->>Lodash: Require ^4.17.23 (updated)
Lodash-->>Home: Provide package
PM-->>Home: Dependencies resolved
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.
| "@rjsf/utils": "5.7.3", | ||
| "@rjsf/validator-ajv8": "5.7.3", | ||
| "@types/react": "^16.13.1 || ^17.0.0", | ||
| "lodash": "^4.17.21", | ||
| "lodash": "^4.17.23", | ||
| "react-grid-layout": "^1.3.4", | ||
| "react-resizable": "^3.0.4", | ||
| "react-use": "^17.2.4", |
There was a problem hiding this comment.
Correctness: lodash@4.17.23 does not exist in npm registry; this will break npm install/yarn install. Use ^4.17.21 (latest 4.x) or verify the intended version.
🤖 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/home/package.json, Line 51
Problem: The lodash version `^4.17.23` does not exist in the npm registry and will cause package installation to fail.
Fix Instructions:
1. Verify the latest stable lodash version in npm registry (currently 4.17.21)
2. If this was intended as a security update, confirm which CVE you're addressing
3. Update the version to `^4.17.21` (latest stable) or consider migrating to `lodash-es` for modern projects
4. Run `npm install` or `yarn install` to verify the dependency resolves correctly
5. Check for any breaking changes in release notes if upgrading from an older version
✨ Committable Code Suggestion
💡 This is a one-click fix! Click "Commit suggestion" to apply this change directly to your branch.
| "@rjsf/utils": "5.7.3", | |
| "@rjsf/validator-ajv8": "5.7.3", | |
| "@types/react": "^16.13.1 || ^17.0.0", | |
| "lodash": "^4.17.21", | |
| "lodash": "^4.17.23", | |
| "react-grid-layout": "^1.3.4", | |
| "react-resizable": "^3.0.4", | |
| "react-use": "^17.2.4", | |
| "@rjsf/material-ui-v5": "npm:@rjsf/material-ui@5.7.3", | |
| "@rjsf/utils": "5.7.3", | |
| "@rjsf/validator-ajv8": "5.7.3", | |
| "@types/react": "^16.13.1 || ^17.0.0", | |
| "lodash": "^4.17.21", | |
| "react-grid-layout": "^1.3.4", | |
| "react-resizable": "^3.0.4", | |
| "react-use": "^17.2.4", |
|
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 4 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
plugins/home/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
SNYK-JS-LODASH-15053838
SNYK-JS-LODASHES-15053836
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)
🦉 Prototype Pollution
EntelligenceAI PR Summary
This PR updates dependency versions in the home plugin's package.json to use published packages and incorporate security updates.