[Snyk] Fix for 1 vulnerabilities#10861
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-TAR-15032660
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
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 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 transitions the CLI package from workspace-based dependencies to published package versions and updates a critical dependency. Three internal Backstage packages are pinned to specific versions instead of using workspace protocol references, indicating a move toward using published packages rather than local monorepo references. The tar package receives a major version upgrade from v6 to v7, which likely addresses security vulnerabilities or provides important functionality improvements. These changes prepare the CLI package for standalone distribution or resolve dependency management issues in the build/release process.
Changes
| File(s) | Summary |
|---|---|
packages/cli/package.json |
Replaced workspace protocol references (workspace:^) with pinned versions for three internal Backstage packages: @backstage/catalog-model (0.1.1), @backstage/config-loader (0.1.1), and @backstage/release-manifests (0.0.1). Upgraded tar package from ^6.1.12 to ^7.5.4 (major version bump). |
Sequence Diagram
This diagram shows the interactions between components:
sequenceDiagram
participant Dev as Developer
participant PM as Package Manager
participant CLI as @backstage/cli
participant CM as @backstage/catalog-model
participant CL as @backstage/config-loader
participant RM as @backstage/release-manifests
participant Tar as tar package
Dev->>PM: Install/Update dependencies
PM->>CLI: Read package.json
Note over CLI: Dependency version changes:<br/>- catalog-model: workspace → 0.1.1<br/>- config-loader: workspace → 0.1.1<br/>- release-manifests: workspace → 0.0.1<br/>- tar: ^6.1.12 → ^7.5.4
PM->>CM: Resolve @backstage/catalog-model@0.1.1
CM-->>PM: Package resolved
PM->>CL: Resolve @backstage/config-loader@0.1.1
CL-->>PM: Package resolved
PM->>RM: Resolve @backstage/release-manifests@0.0.1
RM-->>PM: Package resolved
PM->>Tar: Resolve tar@^7.5.4 (upgraded from 6.x)
Tar-->>PM: Package resolved
PM->>CLI: Install all dependencies
CLI-->>Dev: CLI ready with updated dependencies
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.
| "@backstage/catalog-model": "0.1.1", | ||
| "@backstage/cli-common": "workspace:^", | ||
| "@backstage/cli-node": "workspace:^", | ||
| "@backstage/config": "workspace:^", | ||
| "@backstage/config-loader": "workspace:^", | ||
| "@backstage/config-loader": "0.1.1", | ||
| "@backstage/errors": "workspace:^", | ||
| "@backstage/eslint-plugin": "workspace:^", | ||
| "@backstage/integration": "workspace:^", | ||
| "@backstage/release-manifests": "workspace:^", | ||
| "@backstage/release-manifests": "0.0.1", |
There was a problem hiding this comment.
Correctness: Revert these dependencies to workspace:^. Hardcoding versions breaks the monorepo workspace protocol, causing the package to resolve stale versions from the registry instead of the local workspace packages.
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
File: packages/cli/package.json
Lines: 33-41
Problem: Three internal Backstage dependencies have been changed from workspace protocol (`workspace:^`) to hardcoded versions (`0.1.1` and `0.0.1`). This breaks the monorepo's dependency management strategy.
Impact:
- Prevents automatic version synchronization across the workspace
- Creates version drift between packages
- May cause runtime errors if APIs change in newer versions
- Breaks the standard Backstage monorepo workflow
Fix Instructions:
1. Revert `@backstage/catalog-model` from `"0.1.1"` back to `"workspace:^"`
2. Revert `@backstage/config-loader` from `"0.1.1"` back to `"workspace:^"`
3. Revert `@backstage/release-manifests` from `"0.0.1"` back to `"workspace:^"`
4. Ensure all internal `@backstage/*` dependencies use `workspace:^` protocol for proper monorepo version management
5. If specific versions are required for a release, use the workspace's version management tooling instead of hardcoding
✨ Committable Code Suggestion
💡 This is a one-click fix! Click "Commit suggestion" to apply this change directly to your branch.
| "@backstage/catalog-model": "0.1.1", | |
| "@backstage/cli-common": "workspace:^", | |
| "@backstage/cli-node": "workspace:^", | |
| "@backstage/config": "workspace:^", | |
| "@backstage/config-loader": "workspace:^", | |
| "@backstage/config-loader": "0.1.1", | |
| "@backstage/errors": "workspace:^", | |
| "@backstage/eslint-plugin": "workspace:^", | |
| "@backstage/integration": "workspace:^", | |
| "@backstage/release-manifests": "workspace:^", | |
| "@backstage/release-manifests": "0.0.1", | |
| "bin": { | |
| "backstage-cli": "bin/backstage-cli" | |
| }, | |
| "dependencies": { | |
| "@backstage/catalog-model": "workspace:^", | |
| "@backstage/cli-common": "workspace:^", | |
| "@backstage/cli-node": "workspace:^", | |
| "@backstage/config": "workspace:^", | |
| "@backstage/config-loader": "workspace:^", | |
| "@backstage/errors": "workspace:^", | |
| "@backstage/eslint-plugin": "workspace:^", | |
| "@backstage/integration": "workspace:^", | |
| "@backstage/release-manifests": "workspace:^", | |
| "@backstage/types": "workspace:^", | |
| "@esbuild-kit/cjs-loader": "^2.4.1", | |
| "@manypkg/get-packages": "^1.1.3", |
|
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 1 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
packages/cli/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-15032660
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:
🦉 Directory Traversal
EntelligenceAI PR Summary
This PR updates dependency specifications in the CLI package, transitioning from workspace references to pinned versions and upgrading the tar library.
@backstage/catalog-modelto version 0.1.1 (previouslyworkspace:^)@backstage/config-loaderto version 0.1.1 (previouslyworkspace:^)@backstage/release-manifeststo version 0.0.1 (previouslyworkspace:^)tarpackage from^6.1.12to^7.5.4(major version update)