-
Notifications
You must be signed in to change notification settings - Fork 0
Dev sample #7
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
base: main
Are you sure you want to change the base?
Dev sample #7
Conversation
Benny wants to say something to you
…-says-moo into Benjamin-Zhao
…-says-moo into Benjamin-Zhao
…assets including menu icon, etc.
add a new file
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.1 to 7.5.2. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.1...v7.5.2) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…r-7.5.2 Bump tar from 7.5.1 to 7.5.2
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…-yaml-4.1.1 Bump js-yaml from 4.1.0 to 4.1.1
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.
Pull Request Overview
Copilot reviewed 62 out of 82 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| VITE_FIREBASE_API_KEY = "AIzaSyA_u-dNDgYCkl-Sh7FW-bj42m9hoW_GRcs" | ||
| VITE_FIREBASE_MESSAGING_SENDER_ID = "930455928110" | ||
| VITE_FIREBASE_APP_ID = "1:930455928110:web:fb911ef83dc61712f24ebf" No newline at end of file |
Copilot
AI
Nov 20, 2025
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.
CRITICAL SECURITY ISSUE: Firebase API keys and configuration are exposed in the wrangler.toml file. These credentials should be stored as environment variables or secrets, not hardcoded in the configuration file that gets committed to version control.
Move these to environment variables:
- Use Cloudflare's secrets management for sensitive data
- Reference them via
varsbinding or Workers secrets - Never commit API keys, even if they appear to be restricted
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.
CRITICAL SECURITY ISSUE: Firebase API keys and configuration are exposed in the wrangler.toml file. These credentials should be stored as environment variables or secrets, not hardcoded in the configuration file that gets committed to version control.
Move these to environment variables:
- Use Cloudflare's secrets management for sensitive data
- Reference them via
varsbinding or Workers secrets- Never commit API keys, even if they appear to be restricted
@copilot but aren't firebase API keys meant to be public?
| } | ||
| }, | ||
| plugins: [daisyui] | ||
| plugins: [] |
Copilot
AI
Nov 20, 2025
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 daisyui import was removed but may still be referenced elsewhere in the codebase. Ensure all daisyui-specific classes and components have been replaced or removed from the application.
| import { SvelteKitAuth } from '@auth/sveltekit'; | ||
| import Google from '@auth/core/providers/google'; | ||
| import { env } from '$env/dynamic/private'; | ||
| import { sequence } from '@sveltejs/kit/hooks'; |
Copilot
AI
Nov 20, 2025
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.
Unused import sequence.
| import { sequence } from '@sveltejs/kit/hooks'; |
|
@hackinghackers I've opened a new pull request, #22, to work on those changes. Once the pull request is ready, I'll request review from you. |
Clarify Firebase API key security model - no changes needed
|
/gemini help |
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. |
|
@gemini-code-assistant |
|
It looks like there might be a slight typo in my username. My correct username is |
|
Hello! It looks like you're trying to interact with me. Just a friendly reminder that you can use commands like I'm here to assist by responding to comments and providing code suggestions, but I'm not able to take any direct actions on the pull request myself. |
|
/gemini summary |
Summary of ChangesThis pull request significantly overhauls the "Cow Says Moo" web project by introducing a robust authentication system with Google OAuth, a user onboarding flow, and a comprehensive admin panel. It modernizes the UI with Highlights
Changelog
Activity
|
|
/gemini review |
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 introduces a significant number of changes, including a switch in the UI library from DaisyUI to shadcn-svelte, addition of authentication, new pages, and server-side logic. The overall structure is good, with clear separation of concerns (e.g., client-side vs. server-side Firebase logic). However, there are several critical security vulnerabilities in the Firestore rules and a hardcoded API key in wrangler.toml that must be addressed. I've also found issues related to code quality, maintainability, and correctness, such as disabled ESLint rules, use of !important in CSS, obfuscated code, and potential runtime errors from unsafe JSON parsing. My detailed comments below provide suggestions to fix these issues.
| // (allows Google Sheets script to update) | ||
| match /summary/{section} { | ||
| allow read: if true; | ||
| allow write: if true; |
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.
| VITE_FIREBASE_API_KEY = "AIzaSyA_u-dNDgYCkl-Sh7FW-bj42m9hoW_GRcs" | ||
| VITE_FIREBASE_MESSAGING_SENDER_ID = "930455928110" | ||
| VITE_FIREBASE_APP_ID = "1:930455928110:web:fb911ef83dc61712f24ebf" No newline at end of file |
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.
Hardcoding secrets like VITE_FIREBASE_API_KEY in configuration files is a critical security vulnerability. These secrets will be exposed in your version control history. Please remove them from this file and configure them as secrets in your Cloudflare Pages project settings. The code already seems to be reading them from the environment, which is the correct approach.
| let _a = $state(0); | ||
|
|
||
| let _b = $state(false); | ||
|
|
||
| const _d = () => { | ||
| const _e = [ | ||
| '/image/footer/PixPin_2025-01-26_19-15-33-b450cfc8.png', | ||
| '/image/footer/PixPin_2025-01-26_19-16-35-e4ecaee9.png', | ||
| '/image/footer/PixPin_2025-01-26_19-16-43-9f2af5e9.png', | ||
| '/image/footer/PixPin_2025-02-11_17-44-59-7c8eeb98.png', | ||
| '/image/footer/furina-b7335471.png' | ||
| ]; | ||
| return _e[Math.floor(Math.random() * _e.length)]; | ||
| }; | ||
|
|
||
| let _f = $state(''); | ||
|
|
||
| const _g = () => { | ||
| return { | ||
| track: (evt: string) => { | ||
| if (evt === 'footer') { | ||
| _a = (_a + 1) % 7; | ||
| if (_a === 6) { | ||
| _b = true; | ||
| _f = _d(); | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| }; | ||
|
|
||
| const analytics = _g(); | ||
|
|
||
| let _h = 0; | ||
|
|
||
| function _i(event: MouseEvent) { | ||
| const now = Date.now(); | ||
| if (now - _h < 100) return; | ||
| _h = now; | ||
| analytics.track('footer'); | ||
| } |
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 variable and function names in this component (e.g., _a, _b, _d, _g) are obfuscated, which makes the code extremely difficult to read, understand, and maintain. Please rename them to be descriptive. For example:
_a->footerClickCount_b->isEasterEggVisible_d->getRandomEasterEggUrl_g->createAnalyticsTracker
| allow write: if request.resource.data.points.albemarle is number | ||
| && request.resource.data.points.ettl is number | ||
| && request.resource.data.points.hobler is number | ||
| && request.resource.data.points.lambert is number; |
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.
| allow update: if request.resource.data.email == email && | ||
| request.resource.data.role == resource.data.role; // Cannot change role |
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 current update rule for members allows any user to update any other user's profile information (like name and house), as it only checks that the email and role are not changed. This could lead to users impersonating others by changing their names. Updates should be restricted to the document owner or an administrator. A user should also not be able to escalate their own privileges.
allow update: if (isOwner(email) && request.resource.data.role == resource.data.role) || isAdmin();
| :root { | ||
| --light-beige-pink: #fae5e1; | ||
| --color-event-current-event-bg: #f8f8f8; | ||
| --color-event-current-event-fg: #5c5445; | ||
| --color-event-upcoming-bg: #e5e5e5; | ||
| --color-event-upcoming-fg: #585858; | ||
| --color-event-albemarle-bg: #fff9ba; | ||
| --color-event-albemarle-fg: #6e6503; | ||
| --color-event-lambert-bg: #dae4f8; | ||
| --color-event-lambert-fg: #194c7c; | ||
| --color-event-ettl-bg: #e6f7d2; | ||
| --color-event-ettl-fg: #0a6a0a; | ||
| --color-event-hobler-bg: #f5cccc; | ||
| --color-event-hobler-fg: #800f11; | ||
| } |
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.
|
|
||
| <div class="events-grid"> | ||
| {#each events as event, i} | ||
| {@const eventStarted = (event.dateStart.seconds - 432000) * 1000 > Date.now()} |
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.
| <script lang="ts"> | ||
| import { Input } from '$lib/components/ui/input'; | ||
|
|
||
| let { source_page } = $props(); |
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.
| @@ -0,0 +1,47 @@ | |||
| /** biome-ignore-all lint/suspicious/noExplicitAny: idgaf*/ | |||
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 comment /** biome-ignore-all lint/suspicious/noExplicitAny: idgaf*/ is unprofessional and should be removed. Disabling linting rules for an entire file, especially for no-explicit-any, is also poor practice. The any casts in this file appear to be unnecessary and should be removed to improve type safety.
| } // Members collection - publicly writable with validation | ||
| match /members/{email} { | ||
| // Anyone can read member documents (needed for admin panel) | ||
| allow read: if true; |
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.
Bumps [devalue](https://github.com/sveltejs/devalue) from 5.3.2 to 5.6.2. - [Release notes](https://github.com/sveltejs/devalue/releases) - [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md) - [Commits](sveltejs/devalue@v5.3.2...v5.6.2) --- updated-dependencies: - dependency-name: devalue dependency-version: 5.6.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.47.1 to 2.49.5. - [Release notes](https://github.com/sveltejs/kit/releases) - [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md) - [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/[email protected]/packages/kit) --- updated-dependencies: - dependency-name: "@sveltejs/kit" dependency-version: 2.49.5 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.2 to 7.5.3. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.2...v7.5.3) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…r-7.5.3 Bump tar from 7.5.2 to 7.5.3
…value-5.6.2 Bump devalue from 5.3.2 to 5.6.2
…eltejs/kit-2.49.5 Bump @sveltejs/kit from 2.47.1 to 2.49.5
No description provided.