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
8 changes: 4 additions & 4 deletions packages/dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"dependencies": {
"@backstage/app-defaults": "workspace:^",
"@backstage/catalog-model": "workspace:^",
"@backstage/core-app-api": "workspace:^",
"@backstage/core-components": "workspace:^",
"@backstage/core-app-api": "0.1.0",
"@backstage/core-components": "0.1.0",
"@backstage/core-plugin-api": "workspace:^",
"@backstage/integration-react": "workspace:^",
"@backstage/plugin-catalog-react": "workspace:^",
"@backstage/integration-react": "0.1.1",
"@backstage/plugin-catalog-react": "0.0.1",
Comment on lines +37 to +41

Choose a reason for hiding this comment

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

critical

These changes from workspace:^ to pinned versions are problematic for a few reasons:

  1. Breaks Monorepo Integrity: Using workspace:^ ensures that packages within this monorepo use the versions of other packages from the same workspace. Pinning to specific versions breaks this, potentially leading to multiple versions of the same package in the final bundle and inconsistencies.

  2. Significant Downgrade: The versions being pinned are much older than the current versions available in the workspace. For example:

    • @backstage/core-app-api is being pinned to 0.1.0, but the version in the workspace is 1.9.1-next.0.
    • @backstage/core-components is being pinned to 0.1.0, but the version in the workspace is 0.13.4-next.0.
    • @backstage/integration-react is being pinned to 0.1.1, but the version in the workspace is 1.1.16-next.0.

    Such a major downgrade will almost certainly introduce breaking changes and cause the application to fail.

The warning in the PR description about yarn.lock failing to update is another sign that this automated approach is not compatible with your project's setup.

A better approach to fix the underlying vulnerabilities would be to use Yarn's resolutions feature in the root package.json to force a secure version of the transitive dependency across the entire workspace. This would fix the vulnerability without breaking the monorepo structure or downgrading packages.

For example, if a vulnerability is in the tar package, you could add something like this to the root package.json:

"resolutions": {
  "tar": ">=6.1.11"
}

(The exact version would depend on the patched version for the vulnerability).

Because these changes are very likely to break the build, I'm marking this as critical and suggesting to revert them.

    "@backstage/core-app-api": "workspace:^",
    "@backstage/core-components": "workspace:^",
    "@backstage/core-plugin-api": "workspace:^",
    "@backstage/integration-react": "workspace:^",
    "@backstage/plugin-catalog-react": "workspace:^"

"@backstage/test-utils": "workspace:^",
"@backstage/theme": "workspace:^",
"@material-ui/core": "^4.12.2",
Expand Down
Loading