chore: Add approvedGitRepositories to Yarn config#8672
Merged
Conversation
approvedGitRepositories to Yarn configapprovedGitRepositories to Yarn config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Yarn recently added an
approvedGitRepositoriessetting which is an allowlist for allowed Git repositories that can be installed as dependencies. Git repositories have some security risks, and we don't typically use them, so we can set it to an empty array to disallow Git repositories.References
MetaMask/metamask-module-template#310.
Checklist
Note
Low Risk
Low risk: config-only changes that tighten dependency policy and bump the Yarn toolchain; main impact is potential install/CI breakage if any Git-based deps were relied on implicitly.
Overview
Hardens Yarn dependency sourcing by adding
approvedGitRepositories: []to.yarnrc.yml, explicitly disallowing Git-based dependencies.Bumps the required Yarn version from
4.10.3to4.14.1(rootpackageManagerand matchingyarn constraintscheck), and updatesyarn.lockmetadata accordingly.Reviewed by Cursor Bugbot for commit f0bd7f1. Bugbot is set up for automated code reviews on this repo. Configure here.