build(deps): pin firebase-js-sdk, disallow install of recent packages#9027
build(deps): pin firebase-js-sdk, disallow install of recent packages#9027mikehardy wants to merge 2 commits into
Conversation
this is important because lockfile recreation may allow this to slip, at which point `yarn compare:types` starts to fail we rely on exact versions in practice as we make changes to adopt new versions and may even rely on bug-compatibility internally until a new version is qualified / formally adopted
but explicitly allow packages we have a maintenance relationship with as we adopt versions of those as quickly as possible historically
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces security hardening measures to the repository by implementing a mandatory age-based gate for package installations. By requiring packages to be at least 7 days old before they can be installed, the project aims to reduce the risk of incorporating malicious code from compromised packages. The changes include updates to dependency management tools and specific pinning for the Firebase SDK to ensure stability while maintaining the new security posture. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
None of the Gemini comments have merit. This survives local testing as an A/B to verify it does what's expected with regards to which package versions of things actually install and which do not. The configuration options used are relatively new, but the usage matches documented examples. |
Description
This PR is focused on hardening the repository to supply chain attacks
Specifically, one of the most effective means to stop the repo from direct compromise (and then possibly propagating) a supply-chain attack is to only install packages that have aged a certain amount - allowing detection and remediation in the broader ecosystem to take place on potentially trojan packages prior to any attempt to install.
I have conservatively chosen 7 days as a minimum age here, though 3 days is also common.
Yarn and dependabot configs are updated to enforce this
Please note this may conflict with a desire to update the firebase-js-sdk package, this is an unavoidable tension between usability and security. The appropriate action is to add an exception for a specific version that is younger than 7 days in
.yarnrc.ymlas described in that file should the need ariseRelated issues
None logged, but security is a process and the entire broader ecosystem is hardening repositories bit by bit. This is us doing our part.
Release Summary
No release necessary, all local build related
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
If CI still passes, this is good. There should be no practical effect at the moment.
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter