-
Notifications
You must be signed in to change notification settings - Fork 1
[Snyk] Fix for 8 vulnerabilities #10699
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
…vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-BACKSTAGEPLUGINSCAFFOLDERNODE-15054276 - https://snyk.io/vuln/SNYK-JS-TAR-6476909 - https://snyk.io/vuln/SNYK-JS-TAR-15038581 - 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
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
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 enhance the project's security posture by resolving eight identified vulnerabilities within its 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
|
✅ 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. |
WalkthroughThis PR updates dependency management in the scaffolder-backend-module-yeoman plugin's package.json. The changes transition three Backstage internal dependencies from workspace protocol references to pinned specific versions, ensuring consistent dependency resolution across environments. Additionally, the yeoman-environment package is upgraded from version 3.9.1 to 4.0.0, representing a major version bump that may introduce breaking changes or new features. These updates likely aim to stabilize the build process and leverage improvements in the latest yeoman-environment release. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
participant User
participant Scaffolder as Scaffolder Backend
participant YeomanAction as Yeoman Action
participant YeomanEnv as Yeoman Environment (v4.0.0)
participant Generator as Yeoman Generator
User->>Scaffolder: Trigger template execution
Scaffolder->>YeomanAction: Execute yeoman action
activate YeomanAction
YeomanAction->>YeomanEnv: Create environment instance
activate YeomanEnv
YeomanEnv-->>YeomanAction: Environment ready
YeomanAction->>YeomanEnv: Register generator
YeomanEnv->>Generator: Load generator
activate Generator
Generator-->>YeomanEnv: Generator registered
YeomanAction->>YeomanEnv: Run generator with options
YeomanEnv->>Generator: Execute generation
Generator->>Generator: Process templates
Generator->>Generator: Generate files
Generator-->>YeomanEnv: Generation complete
deactivate Generator
YeomanEnv-->>YeomanAction: Execution result
deactivate YeomanEnv
YeomanAction-->>Scaffolder: Action complete
deactivate YeomanAction
Scaffolder-->>User: Template scaffolded
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 several security vulnerabilities by updating dependencies. However, it introduces a critical issue by replacing workspace:^ dependency specifiers with pinned versions for internal Backstage packages. This breaks the yarn workspace conventions of the monorepo and will likely cause build failures or runtime errors by using outdated packages. Additionally, it includes a major version upgrade for yeoman-environment, which carries a risk of breaking changes. I've left specific comments on how to address these issues. The changes to internal packages should be reverted, and vulnerabilities should be addressed using yarn's resolutions feature instead.
| "@backstage/config": "0.1.1", | ||
| "@backstage/plugin-scaffolder-node": "0.11.2", | ||
| "@backstage/types": "0.1.1", |
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.
Replacing workspace:^ with pinned versions is incorrect for this monorepo, which uses yarn workspaces. This change will cause this package to use old, published versions of @backstage/config and @backstage/types from the npm registry instead of the up-to-date versions from this workspace.
Specifically:
@backstage/configwould be downgraded from the workspace version (which appears to be1.0.8) to0.1.1.@backstage/typeswould be downgraded from the workspace version (which appears to be1.1.0) to0.1.1.
This will almost certainly lead to build failures or runtime errors. While the goal of fixing vulnerabilities is important, these changes are not the correct way to do it in this project structure.
The correct approach would be to:
- Keep the
workspace:^specifiers. - Identify which transitive dependencies are vulnerable.
- Use
resolutionsin the rootpackage.jsonto force a secure version of the vulnerable packages across the entire workspace.
I recommend reverting these changes and using resolutions instead.
"@backstage/config": "workspace:^",
"@backstage/plugin-scaffolder-node": "workspace:^",
"@backstage/types": "workspace:^"| "@backstage/types": "0.1.1", | ||
| "winston": "^3.2.1", | ||
| "yeoman-environment": "^3.9.1" | ||
| "yeoman-environment": "^4.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.
This is a major version upgrade for yeoman-environment (from ^3.9.1 to ^4.0.0). Major versions can introduce breaking changes, and the Snyk metadata for this PR indicates isBreakingChange:true. Please carefully review the yeoman-environment v4 release notes and update the code in this module to be compatible with the new version before merging.
Snyk has created this PR to fix 8 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
plugins/scaffolder-backend-module-yeoman/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-BACKSTAGEPLUGINSCAFFOLDERNODE-15054276
SNYK-JS-TAR-6476909
SNYK-JS-TAR-15038581
SNYK-JS-ELLIPTIC-14908844
SNYK-JS-BACKSTAGEBACKENDPLUGINAPI-15054291
SNYK-JS-LODASH-15053838
SNYK-JS-LODASHES-15053836
SNYK-JS-DIFF-14917201
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
🦉 Regular Expression Denial of Service (ReDoS)
🦉 Prototype Pollution
EntelligenceAI PR Summary
This PR updates dependency versions in the scaffolder-backend-module-yeoman package.json, transitioning from workspace references to pinned versions and upgrading yeoman-environment to v4.