Skip to content

[Snyk] Fix for 3 vulnerabilities#11604

Closed
q1blue wants to merge 1 commit intomasterfrom
snyk-fix-c76e88ac11edb28c8198cd0b49dc9606
Closed

[Snyk] Fix for 3 vulnerabilities#11604
q1blue wants to merge 1 commit intomasterfrom
snyk-fix-c76e88ac11edb28c8198cd0b49dc9606

Conversation

@q1blue
Copy link
Copy Markdown
Collaborator

@q1blue q1blue commented Feb 1, 2026

snyk-top-banner

Snyk has created this PR to fix 3 vulnerabilities in the yarn dependencies of this project.

Snyk changed the following file(s):

  • plugins/kubernetes-backend/package.json

Note 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 run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠️ Warning
Failed to update the yarn.lock, please update manually before merging.

Vulnerabilities that will be fixed with an upgrade:

Issue Score
medium severity Directory Traversal
SNYK-JS-TAR-15032660
  149  
medium severity Directory Traversal
SNYK-JS-TAR-15127355
  127  
medium severity Uncontrolled Recursion
SNYK-JS-ESLINT-15102420
  45  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

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:

🦉 Directory Traversal


EntelligenceAI PR Summary

This PR transitions the kubernetes-backend plugin from workspace dependency references to pinned versions and upgrades the Kubernetes client library.

  • Pinned six Backstage packages to specific versions: backend-common (0.24.1), catalog-model (0.1.1), plugin-auth-node (0.1.0), plugin-catalog-node (1.0.0), plugin-kubernetes-common (0.1.0), and plugin-permission-node (0.1.0)
  • Upgraded @kubernetes/client-node from 0.18.1 to 0.21.0
  • Changes made in plugins/kubernetes-backend/package.json

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Feb 1, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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 posture by resolving identified vulnerabilities in its yarn dependencies. The changes primarily involve updating specific package versions within the plugins/kubernetes-backend module to incorporate necessary security patches, thereby mitigating potential risks associated with directory traversal and uncontrolled recursion.

Highlights

  • Vulnerability Fixes: This pull request addresses three medium-severity security vulnerabilities identified by Snyk: two Directory Traversal issues (SNYK-JS-TAR-15032660, SNYK-JS-TAR-15127355) and one Uncontrolled Recursion issue (SNYK-JS-ESLINT-15102420) within the project's yarn dependencies.
  • Dependency Updates: Several key dependencies in plugins/kubernetes-backend/package.json have been updated to newer, patched versions. This includes @backstage/backend-common, @backstage/catalog-model, @backstage/plugin-auth-node, @backstage/plugin-catalog-node, @backstage/plugin-kubernetes-common, @backstage/plugin-permission-node, and @kubernetes/client-node.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Feb 1, 2026

Snyk checks have failed. 1 issues have been found so far.

Status Scanner Critical High Medium Low Total (1)
Open Source Security 0 0 1 0 1 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@entelligence-ai-pr-reviews
Copy link
Copy Markdown

Walkthrough

This PR updates the kubernetes-backend plugin's dependencies by transitioning from workspace references to pinned versions for multiple Backstage packages. The changes include upgrading six core Backstage packages (@backstage/backend-common, @backstage/catalog-model, @backstage/plugin-auth-node, @backstage/plugin-catalog-node, @backstage/plugin-kubernetes-common, and @backstage/plugin-permission-node) to their specific versioned releases. Additionally, the Kubernetes client library (@kubernetes/client-node) is upgraded from version 0.18.1 to 0.21.0, bringing potential new features and bug fixes for Kubernetes client functionality. These changes improve dependency management and version control for the plugin.

Changes

File(s) Summary
plugins/kubernetes-backend/package.json Updated Backstage package dependencies from workspace references to pinned versions: @backstage/backend-common (0.24.1), @backstage/catalog-model (0.1.1), @backstage/plugin-auth-node (0.1.0), @backstage/plugin-catalog-node (1.0.0), @backstage/plugin-kubernetes-common (0.1.0), and @backstage/plugin-permission-node (0.1.0). Upgraded @kubernetes/client-node from 0.18.1 to 0.21.0.

Sequence Diagram

This diagram shows the interactions between components:

sequenceDiagram
    participant KubeBackend as Kubernetes Backend Plugin
    participant BackstageCore as Backstage Core Packages
    participant K8sClient as Kubernetes Client
    participant CloudSDKs as Cloud Provider SDKs
    
    Note over KubeBackend: Dependency Version Updates
    
    KubeBackend->>BackstageCore: Update to specific versions
    Note right of BackstageCore: backend-common: 0.24.1<br/>catalog-model: 0.1.1<br/>auth-node: 0.1.0<br/>catalog-node: 1.0.0<br/>permission-node: 0.1.0
    
    KubeBackend->>K8sClient: Upgrade client library
    Note right of K8sClient: @kubernetes/client-node<br/>0.18.1 → 0.21.0
    
    KubeBackend->>CloudSDKs: Maintain existing versions
    Note right of CloudSDKs: AWS SDK, Azure Identity,<br/>Google Cloud Container
    
    Note over KubeBackend,CloudSDKs: No functional changes<br/>Version alignment only
Loading

▶️AI Code Reviews for VS Code, Cursor, Windsurf
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

  1. config - shows the current config
  2. retrigger_review - retriggers the review

More commands to be added soon.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a 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 three security vulnerabilities by updating dependencies in plugins/kubernetes-backend/package.json. However, the approach taken by pinning workspace: dependencies to fixed versions is problematic for this monorepo setup, as it breaks the internal package linkage. Additionally, it introduces a major version upgrade for @kubernetes/client-node, which could have breaking changes. My review suggests reverting these changes and addressing the vulnerabilities by updating the yarn.lock file, which is the standard procedure for fixing transitive dependency issues in this project.

Comment on lines +56 to +70
"@backstage/backend-common": "0.24.1",
"@backstage/backend-plugin-api": "workspace:^",
"@backstage/catalog-client": "workspace:^",
"@backstage/catalog-model": "workspace:^",
"@backstage/catalog-model": "0.1.1",
"@backstage/config": "workspace:^",
"@backstage/errors": "workspace:^",
"@backstage/integration-aws-node": "workspace:^",
"@backstage/plugin-auth-node": "workspace:^",
"@backstage/plugin-catalog-node": "workspace:^",
"@backstage/plugin-kubernetes-common": "workspace:^",
"@backstage/plugin-auth-node": "0.1.0",
"@backstage/plugin-catalog-node": "1.0.0",
"@backstage/plugin-kubernetes-common": "0.1.0",
"@backstage/plugin-permission-common": "workspace:^",
"@backstage/plugin-permission-node": "workspace:^",
"@backstage/plugin-permission-node": "0.1.0",
"@google-cloud/container": "^4.0.0",
"@jest-mock/express": "^2.0.1",
"@kubernetes/client-node": "0.18.1",
"@kubernetes/client-node": "0.21.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

These changes pin dependencies that were previously using the workspace: protocol to specific versions. While this might resolve the Snyk vulnerabilities, it's not the right approach for this monorepo as it breaks the linkage between packages.

The workspace: protocol ensures that this package always uses the version of the dependency from within this monorepo. Pinning to a specific version means this package will not receive updates when the local dependencies are updated, which can lead to inconsistencies and bugs.

Additionally, @kubernetes/client-node is upgraded across a major version (0.18.1 to 0.21.0), which could introduce breaking changes.

The PR description notes that yarn.lock failed to update. The correct fix is to resolve any issues with yarn install and update the yarn.lock file. This will update the transitive dependencies (like tar and eslint) to non-vulnerable versions without breaking the workspace setup.

Please revert these changes and run yarn install to update the lockfile. If the vulnerabilities persist, they should be addressed by updating the specific transitive dependencies or handling the major upgrade of @kubernetes/client-node in a separate, dedicated PR.

    "@backstage/backend-common": "workspace:^",
    "@backstage/backend-plugin-api": "workspace:^",
    "@backstage/catalog-client": "workspace:^",
    "@backstage/catalog-model": "workspace:^",
    "@backstage/config": "workspace:^",
    "@backstage/errors": "workspace:^",
    "@backstage/integration-aws-node": "workspace:^",
    "@backstage/plugin-auth-node": "workspace:^",
    "@backstage/plugin-catalog-node": "workspace:^",
    "@backstage/plugin-kubernetes-common": "workspace:^",
    "@backstage/plugin-permission-common": "workspace:^",
    "@backstage/plugin-permission-node": "workspace:^",
    "@google-cloud/container": "^4.0.0",
    "@jest-mock/express": "^2.0.1",
    "@kubernetes/client-node": "0.18.1"

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 8, 2026

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!

@github-actions github-actions Bot added the stale label Feb 8, 2026
@github-actions github-actions Bot closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants