-
Notifications
You must be signed in to change notification settings - Fork 1
[Snyk] Fix for 10 vulnerabilities #10707
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: master
Are you sure you want to change the base?
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-BACKSTAGEBACKENDDEFAULTS-15054278 - https://snyk.io/vuln/SNYK-JS-BACKSTAGEPLUGINSCAFFOLDERBACKEND-15054277 - https://snyk.io/vuln/SNYK-JS-TAR-15038581 - https://snyk.io/vuln/SNYK-JS-BACKSTAGEPLUGINSCAFFOLDERNODE-15054276 - https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844 - https://snyk.io/vuln/SNYK-JS-BACKSTAGEBACKENDPLUGINAPI-15054291 - https://snyk.io/vuln/SNYK-JS-LODASH-15053838 - https://snyk.io/vuln/SNYK-JS-LODASHES-15053836 - https://snyk.io/vuln/SNYK-JS-DIFF-14917201 - https://snyk.io/vuln/SNYK-JS-BACKSTAGEBACKENDDEFAULTS-15064476
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. |
Summary of ChangesHello @q1blue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request, automatically generated by Snyk, aims to bolster the project's security by resolving 10 identified vulnerabilities within its Yarn dependencies. It primarily updates various Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughThis pull request updates the dependency management strategy for the backend-next package by replacing workspace protocol references with specific published versions. Thirteen Backstage plugin dependencies are affected, spanning core backend functionality, plugin backends, and common modules. The change transitions from local monorepo development dependencies (workspace:^) to consuming specific released versions of packages including backend-defaults, backend-tasks, catalog, scaffolder, techdocs, kubernetes, and others. This modification typically indicates preparation for a release, dependency stabilization, or a shift from development to production-ready dependency management. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
participant Dev as Developer
participant PM as Package Manager
participant Registry as NPM Registry
participant Backend as backend-next Package
Dev->>PM: Update package.json dependencies
Note over Dev,PM: Pin workspace dependencies<br/>to specific versions
PM->>Registry: Resolve dependency versions
Note over Registry: @backstage/backend-defaults: 0.12.2<br/>@backstage/plugin-catalog-backend: 0.1.1<br/>@backstage/plugin-scaffolder-backend: 2.2.2<br/>and 8 other packages
Registry-->>PM: Return package metadata
PM->>Backend: Install pinned dependencies
activate Backend
loop For each updated dependency
PM->>Registry: Download package
Registry-->>PM: Package tarball
PM->>Backend: Install to node_modules
end
Backend-->>PM: Dependencies installed
deactivate Backend
PM-->>Dev: Installation complete
Note over Dev,Backend: Dependencies now use fixed versions<br/>instead of workspace references
Note for WindsurfPlease 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 belowEmoji Descriptions:
Interact with the Bot:
Also you can trigger various commands with the bot by doing The current supported commands are
More commands to be added soon. |
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.
Code Review
This pull request, automatically generated by Snyk, aims to fix security vulnerabilities by updating dependencies. However, the approach taken is not suitable for this monorepo. It replaces workspace:^ specifiers with pinned versions in packages/backend-next/package.json, which breaks the internal dependency linking of the Yarn workspace. This is a critical issue that would disrupt the development workflow and lead to inconsistencies. My review includes a detailed comment explaining the problem and recommending the correct approach to apply these security fixes without breaking the monorepo structure. The PR also failed to update the yarn.lock file, which needs to be addressed manually.
| "@backstage/backend-defaults": "0.12.2", | ||
| "@backstage/backend-tasks": "0.6.1", | ||
| "@backstage/plugin-adr-backend": "workspace:^", | ||
| "@backstage/plugin-app-backend": "workspace:^", | ||
| "@backstage/plugin-app-backend": "0.1.1", | ||
| "@backstage/plugin-auth-node": "workspace:^", | ||
| "@backstage/plugin-azure-devops-backend": "workspace:^", | ||
| "@backstage/plugin-badges-backend": "workspace:^", | ||
| "@backstage/plugin-catalog-backend": "workspace:^", | ||
| "@backstage/plugin-catalog-backend": "0.1.1", | ||
| "@backstage/plugin-catalog-backend-module-unprocessed": "workspace:^", | ||
| "@backstage/plugin-devtools-backend": "workspace:^", | ||
| "@backstage/plugin-entity-feedback-backend": "workspace:^", | ||
| "@backstage/plugin-kubernetes-backend": "workspace:^", | ||
| "@backstage/plugin-kubernetes-backend": "0.1.1", | ||
| "@backstage/plugin-lighthouse-backend": "workspace:^", | ||
| "@backstage/plugin-linguist-backend": "workspace:^", | ||
| "@backstage/plugin-permission-backend": "workspace:^", | ||
| "@backstage/plugin-permission-common": "workspace:^", | ||
| "@backstage/plugin-permission-common": "0.1.0", | ||
| "@backstage/plugin-permission-node": "workspace:^", | ||
| "@backstage/plugin-scaffolder-backend": "workspace:^", | ||
| "@backstage/plugin-scaffolder-backend": "2.2.2", | ||
| "@backstage/plugin-search-backend": "workspace:^", | ||
| "@backstage/plugin-search-backend-module-catalog": "workspace:^", | ||
| "@backstage/plugin-search-backend-module-explore": "workspace:^", | ||
| "@backstage/plugin-search-backend-module-techdocs": "workspace:^", | ||
| "@backstage/plugin-search-backend-module-techdocs": "0.1.0", | ||
| "@backstage/plugin-search-backend-node": "workspace:^", | ||
| "@backstage/plugin-techdocs-backend": "workspace:^", | ||
| "@backstage/plugin-todo-backend": "workspace:^" | ||
| "@backstage/plugin-techdocs-backend": "0.1.1", | ||
| "@backstage/plugin-todo-backend": "0.1.7" |
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.
This automated change from Snyk incorrectly modifies the dependency management for this monorepo. By replacing workspace:^ with pinned versions, it breaks the Yarn workspace linking.
Problem:
In a monorepo configured with Yarn workspaces, workspace:^ ensures that local packages depend on the code of other packages within the same monorepo. Pinning to a specific version (e.g., "@backstage/backend-defaults": "0.12.2") forces Yarn to fetch that version from the package registry, ignoring any local changes made to the @backstage/backend-defaults package. This can lead to:
- Developers testing against outdated or incorrect versions of internal packages.
- Inconsistent behavior between local development and CI/CD builds.
- Difficult-to-diagnose bugs.
The PR description itself warns: Failed to update the yarn.lock, please update manually before merging. This is a strong indicator that the automated process did not handle the monorepo structure correctly.
Recommendation:
These changes should not be merged as they are. The correct way to address the vulnerabilities is to:
- Identify which packages within the workspace need updating.
- Update the
versionfield in thepackage.jsonof those specific packages. - Run
yarn installto update theyarn.lockfile and ensure all workspace packages resolve to the correct local versions.
This will fix the vulnerabilities while preserving the integrity of the monorepo setup.
Snyk has created this PR to fix 10 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
packages/backend-next/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-BACKSTAGEBACKENDDEFAULTS-15054278
SNYK-JS-BACKSTAGEPLUGINSCAFFOLDERBACKEND-15054277
SNYK-JS-TAR-15038581
SNYK-JS-BACKSTAGEPLUGINSCAFFOLDERNODE-15054276
SNYK-JS-ELLIPTIC-14908844
SNYK-JS-BACKSTAGEBACKENDPLUGINAPI-15054291
SNYK-JS-LODASH-15053838
SNYK-JS-LODASHES-15053836
SNYK-JS-DIFF-14917201
SNYK-JS-BACKSTAGEBACKENDDEFAULTS-15064476
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:
🦉 Symlink Attack
🦉 Server-side Request Forgery (SSRF)
🦉 Regular Expression Denial of Service (ReDoS)
🦉 More lessons are available in Snyk Learn
EntelligenceAI PR Summary
This PR stabilizes dependencies in the backend-next package by replacing workspace references with specific published versions.
workspace:^to specific version numbers