-
Notifications
You must be signed in to change notification settings - Fork 1
[Snyk] Fix for 6 vulnerabilities #10711
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-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 upgrading several 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
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
✅ 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 versions in the techdocs-node plugin package.json file. The changes include upgrading the @azure/identity package from version 3.2.1 to 3.4.1, and converting three Backstage internal dependencies from workspace protocol references to fixed published versions: @backstage/backend-common (0.25.0), @backstage/integration (0.1.0), and @backstage/plugin-search-common (0.3.1). This transition from workspace dependencies to specific version numbers suggests preparation for a package release or establishing explicit version compatibility requirements for the techdocs-node plugin. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
participant Client
participant TechDocsNode as TechDocs Node Plugin
participant BackendCommon as @backstage/backend-common
participant Integration as @backstage/integration
participant AzureIdentity as @azure/identity
participant SearchCommon as @backstage/plugin-search-common
participant Storage as Cloud Storage (Azure/AWS/GCS)
Note over TechDocsNode: Dependency versions updated:<br/>backend-common: 0.25.0<br/>integration: 0.1.0<br/>search-common: 0.3.1<br/>azure/identity: ^3.4.1
Client->>TechDocsNode: Request documentation
activate TechDocsNode
TechDocsNode->>BackendCommon: Initialize backend services
activate BackendCommon
BackendCommon-->>TechDocsNode: Service configuration
deactivate BackendCommon
TechDocsNode->>Integration: Get SCM integration config
activate Integration
Integration-->>TechDocsNode: Integration settings
deactivate Integration
alt Azure Storage
TechDocsNode->>AzureIdentity: Authenticate with Azure
activate AzureIdentity
AzureIdentity-->>TechDocsNode: Azure credentials
deactivate AzureIdentity
TechDocsNode->>Storage: Fetch docs from Azure Blob
else AWS/GCS Storage
TechDocsNode->>Storage: Fetch docs from cloud storage
end
activate Storage
Storage-->>TechDocsNode: Documentation files
deactivate Storage
TechDocsNode->>SearchCommon: Index documentation content
activate SearchCommon
SearchCommon-->>TechDocsNode: Indexing complete
deactivate SearchCommon
TechDocsNode-->>Client: Serve documentation
deactivate TechDocsNode
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 vulnerabilities by updating dependencies. While the intent is good, the proposed changes are not suitable for this monorepo structure and could introduce critical breakages.
The main issues are:
- Incorrect Dependency Pinning: The changes replace
workspace:^with fixed versions for internal@backstage/*packages. This breaks the yarn workspace linking, which is fundamental to this monorepo. For example,@backstage/integrationis being downgraded from version1.5.1to0.1.0, which will almost certainly break the application. - Incomplete Update: As noted in the PR description, the
yarn.lockfile has not been updated. This must be done manually by runningyarnafter dependency changes.
I've added specific comments suggesting to revert the changes to the @backstage/* packages. It is strongly recommended to close this automated PR and perform the dependency upgrades manually. You can use a tool like yarn upgrade-interactive to identify and update the vulnerable packages correctly, then run yarn to regenerate the lockfile. This will ensure the monorepo integrity is maintained while fixing the security vulnerabilities.
| "@azure/identity": "^3.4.1", | ||
| "@azure/storage-blob": "^12.5.0", | ||
| "@backstage/backend-common": "workspace:^", | ||
| "@backstage/backend-common": "0.25.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.
Changing this dependency from workspace:^ to a fixed version 0.25.0 breaks the monorepo's workspace linking. This package will no longer resolve to the local @backstage/backend-common package. The version 0.25.0 is also a significant jump from the local version 0.19.2-next.0 found in packages/backend-common/package.json, which could introduce breaking changes.
To fix the underlying vulnerability, it's better to keep the workspace:^ protocol and update the transitive dependencies if needed, or update the version of @backstage/backend-common across the monorepo. Snyk's automated change is likely incorrect for this monorepo setup.
| "@backstage/backend-common": "0.25.0", | |
| "@backstage/backend-common": "workspace:^", |
| "@backstage/config": "workspace:^", | ||
| "@backstage/errors": "workspace:^", | ||
| "@backstage/integration": "workspace:^", | ||
| "@backstage/integration": "0.1.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 change from workspace:^ to 0.1.0 is highly problematic. It breaks the workspace linking to the local @backstage/integration package. Furthermore, it's a major downgrade from the local version 1.5.1 (from packages/integration/package.json). This will almost certainly cause breakages.
This change should be reverted. The correct way to fix the vulnerability is to address it within the @backstage/integration package or its dependencies, while maintaining the workspace:^ reference.
| "@backstage/integration": "0.1.0", | |
| "@backstage/integration": "workspace:^", |
| "@backstage/integration": "0.1.0", | ||
| "@backstage/integration-aws-node": "workspace:^", | ||
| "@backstage/plugin-search-common": "workspace:^", | ||
| "@backstage/plugin-search-common": "0.3.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.
Similar to the other @backstage/* packages, changing this from workspace:^ to a fixed version 0.3.1 is incorrect for this monorepo setup. It breaks the workspace linking. Please revert this to use the workspace:^ protocol to ensure it resolves to the local package.
| "@backstage/plugin-search-common": "0.3.1", | |
| "@backstage/plugin-search-common": "workspace:^", |
| "@aws-sdk/node-http-handler": "^3.350.0", | ||
| "@aws-sdk/types": "^3.347.0", | ||
| "@azure/identity": "^3.2.1", | ||
| "@azure/identity": "^3.4.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.
While updating @azure/identity is good for fixing the vulnerability, please note that other packages in the monorepo, like @backstage/integration in packages/integration/package.json, still use version ^3.2.1. For consistency and to avoid bundling multiple versions of the same package, it would be best to update this dependency across the entire repository.
Snyk has created this PR to fix 6 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
plugins/techdocs-node/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-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:
🦉 Regular Expression Denial of Service (ReDoS)
🦉 Prototype Pollution
EntelligenceAI PR Summary
This PR updates dependency versions in the techdocs-node plugin, transitioning from workspace protocol to published package versions.