Skip to content

Yarn Berry: Fixes subdependency security updates#5930

Merged
pavera merged 2 commits intomainfrom
pavera/yarn-berry-fix-subdeb-security
Oct 20, 2022
Merged

Yarn Berry: Fixes subdependency security updates#5930
pavera merged 2 commits intomainfrom
pavera/yarn-berry-fix-subdeb-security

Conversation

@pavera
Copy link
Copy Markdown
Contributor

@pavera pavera commented Oct 19, 2022

Context

Version resolution for security updates was broken for yarn berry if there were any packages sourced from private registries, even if the private registry was correctly configured. Previously we were not performing version resolution with yarn berry for security updates, this still worked as long as yarn 1 could talk to all of the necessary registries.

Approach

This PR adds specific version resolution calls for yarn berry to the subdependency version resolver so that it doesn't attempt to use yarn 1 when performing this resolution.

Ongoing

This still requires that any package mentioned in yarn.lock or package.json is reachable by Dependabot. This means if there are packages sourced from private registries and Dependabot does not have access to those registries due to lack of configuration or incorrect configuration, a subdependency security update will still fail.

@pavera pavera requested a review from a team as a code owner October 19, 2022 23:08
Copy link
Copy Markdown
Contributor

@honeyankit honeyankit left a comment

Choose a reason for hiding this comment

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

Looks good.

@pavera pavera force-pushed the pavera/yarn-berry-fix-subdeb-security branch from 4b898d9 to d242422 Compare October 20, 2022 12:31
@pavera pavera force-pushed the pavera/yarn-berry-fix-subdeb-security branch from d242422 to 96575ee Compare October 20, 2022 13:28
@pavera pavera force-pushed the pavera/yarn-berry-fix-subdeb-security branch from 96575ee to c4221a0 Compare October 20, 2022 14:00
@pavera pavera merged commit 239aa55 into main Oct 20, 2022
@pavera pavera deleted the pavera/yarn-berry-fix-subdeb-security branch October 20, 2022 14:37
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants