Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/sonarqube-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/backend-common": "workspace:^",
"@backstage/backend-common": "0.24.1",
"@backstage/config": "workspace:^",
"@backstage/errors": "workspace:^",
"@backstage/errors": "0.1.1",
Comment on lines +25 to +27

Choose a reason for hiding this comment

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

high

Pinning workspace dependencies to specific versions like this is an anti-pattern in a monorepo using Yarn workspaces. It breaks the link to the local packages and instead fetches them from the registry, which can lead to inconsistencies and problems during development.

The correct approach to fix these vulnerabilities is to:

  1. Identify which workspace package has the vulnerable transitive dependency (e.g., @backstage/backend-common seems to have a vulnerable version of tar).
  2. Update the dependency within that package's package.json.
  3. Run yarn install at the root to update the yarn.lock file.
  4. Revert the changes in this file to use workspace:^ again.

This will ensure the vulnerabilities are fixed across the monorepo without breaking the workspace setup.

    "@backstage/backend-common": "workspace:^",
    "@backstage/config": "workspace:^",
    "@backstage/errors": "workspace:^"

"@types/express": "*",
"express": "^4.18.1",
"express-promise-router": "^4.1.0",
Expand Down
Loading