-
-
Notifications
You must be signed in to change notification settings - Fork 45
added missing files #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added missing files #350
Conversation
Summary of ChangesHello @JonDevOps, 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 focuses on establishing a robust foundation for the project by integrating essential configuration files, comprehensive documentation, and clear architectural guidelines. It streamlines the development environment, defines critical backend data structures, and refines the repository's overall organization, preparing the project for future development and collaboration. Highlights
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 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 counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request lays a strong foundation for the project by adding necessary configuration files, documentation, and cleaning up the repository structure. The changes introduce a modern Next.js and Firebase stack.
My review has focused on the provided file changes. I've left a few comments regarding development environment safety, license clarity, and a note on data modeling for privacy.
IMPORTANT: I was unable to add comments directly to firestore.rules as it was not included in the provided diff. However, my review of that file revealed several critical security vulnerabilities that must be addressed:
- Follower Count Manipulation (
critical): The rules on lines 38-39 offirestore.rulesallow users to modify their ownfollowerslist, which could be abused to artificially inflate follower counts. This logic should be handled server-side (e.g., via a Cloud Function). - User Enumeration (
high): The rule on line 45 offirestore.rulesallows any authenticated user to list all usernames, creating a user enumeration vulnerability. This should be disabled. - Privacy Bypass (
high): The read rule on line 20 offirestore.rulesfor user profiles does not respect thefollowInfoPrivateflag, exposing follower/following lists even when they are meant to be private.
| # Disabling because we are using prod backends right now | ||
| detect = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration is set to use production backends for development (detect = false; with the comment Disabling because we are using prod backends right now). This poses a critical risk to your production data, as development activities could lead to accidental data corruption, deletion, or exposure. It is strongly recommended to use the local Firebase Emulators or a separate, dedicated development project instead.
# We recommend enabling emulators for local development to avoid impacting production data.
detect = true;
| BSD 3-Clause License | ||
|
|
||
| Copyright (c) 2019, w3Develops | ||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
|
|
||
| * Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
|
|
||
| * Neither the name of the copyright holder nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
| FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) 2013-2019 Blackrock Digital LLC | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LICENSE file contains two separate licenses (BSD 3-Clause and MIT) concatenated together. This creates legal ambiguity regarding how the software is licensed. Please clarify the project's license.
- If the project is intended to be under a single license, this file should contain only that one.
- If it's dual-licensed, the terms should be made explicit, for example by adding a preamble explaining that users can choose which license to use.
| "followInfoPrivate": { | ||
| "type": "boolean", | ||
| "description": "If true, the user's follower and following lists are private." | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The schema includes a followInfoPrivate flag, which is great for user privacy. Please ensure that the backend implementation, particularly the Firestore security rules, correctly enforces this. A common pitfall is having rules that don't prevent unauthorized reads of the followers and following fields when this flag is true. Since Firestore rules don't support field-level read restrictions, this often requires separating sensitive information (like follower lists) into a different document or subcollection that can be secured independently.
No description provided.