-
Notifications
You must be signed in to change notification settings - Fork 2
Security fixes and improvements #227
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
Conversation
- Updated CSP configuration in lib/security/csp-config.ts to allow Cloudflare Insights - Added 'unsafe-inline' and 'unsafe-eval' to script-src for Next.js compatibility - Added https://static.cloudflareinsights.com to script-src for Cloudflare Analytics - Created missing admin routes: /admin/test and /admin/settings - Fixed 404 errors for admin navigation links - This resolves all CSP violations and missing route errors
- Fixed GitHub Actions workflow to use 'needs.deploy-production.outputs.deployment-url' instead of 'steps.deploy-production.outputs.deployment-url' - Fixed both production and staging Lighthouse CI configurations - This resolves the 'INVALID_URL' error where Lighthouse was trying to test empty URLs - The deployment URL is now properly passed from the deployment job to the performance monitoring job
|
Caution Review failedThe pull request is closed. WalkthroughUpdates CI to source deployment URLs via needs.* job outputs. Adds two new admin pages (settings and test). Refactors two leaderboard API routes to use a module-scoped Supabase admin client instead of per-request initialization. Adjusts CSP policies to allow additional script/style sources and Cloudflare Insights. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant R as Next.js Route (GET /leaderboard/...)
participant S as supabaseAdmin (module-scoped)
participant DB as Database
Note over R,S: Module load
R->>S: import supabaseAdmin (initialized from env)
Note over S: Singleton client
U->>R: HTTP GET request
R->>S: Query user_points / profiles
S->>DB: SQL (select, aggregate)
DB-->>S: Rows / aggregates
S-->>R: Data
R-->>U: JSON response (stats/user data)
sequenceDiagram
autonumber
participant GH as GitHub Actions
participant D as deploy-<env> Job
participant L as Lighthouse Job
GH->>D: Run deployment
D-->>GH: Output deployment-url
GH->>L: Start LHCI with needs.deploy-<env>.outputs.deployment-url
L->>L: Generate lighthouserc-*.js using needs.* output
L-->>GH: CI results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
✨ Finishing Touches
🧪 Generate unit tests
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary by CodeRabbit