fix(security): Critical production hardening#7
Open
ibrsiaika wants to merge 3 commits intovydyas:mainfrom
Open
fix(security): Critical production hardening#7ibrsiaika wants to merge 3 commits intovydyas:mainfrom
ibrsiaika wants to merge 3 commits intovydyas:mainfrom
Conversation
CRITICAL FIXES: - CB-1: Downgrade React from 19 RC to stable 18.3.1 - CB-2: Implement admin auth checks on all admin routes (requireAdminAuth helper) - CB-3: Add comprehensive localStorage-Supabase sync hook (use-resume-sync) * Debounced auto-save every 1 second * Periodic cloud sync every 3 seconds * Conflict resolution with localStorage backup * Prevents data loss on logout - CB-4: Add DOMPurify sanitization & enhanced Zod validation * Sanitize all HTML text fields * Validate input sizes (max 5000 chars for descriptions) * Strict schema validation with field limits * Add isomorphic-dompurify package - CB-5: Fix memory leak in Resume component * Remove JSON.stringify key (causes full re-mounts) * Add React.memo with deep prop comparison * Prevent DOM node leaks from drag-drop listeners SECURITY Updates: - HD-4: Implement in-memory rate limiting middleware * Per-IP rate limiting (100 req/min) * Per-user auth limiting (7 req/15min) * 429 status codes with Retry-After headers * Ready for Upstash Redis integration - SC-1: Add comprehensive security headers in next.config.ts * Content-Security-Policy with strict directives * X-Frame-Options: DENY * X-Content-Type-Options: nosniff * X-XSS-Protection headers * Referrer-Policy: strict-origin-when-cross-origin * Permissions-Policy: disable camera/mic/geolocation DEPENDENCIES ADDED: - dompurify@3.0.6 (HTML sanitization) - isomorphic-dompurify@2.3.0 (SSR-safe sanitization) TESTING: - Project builds successfully (webpack/TypeScript compilation) - No breaking changes to existing functionality - ESLint warnings noted (unused imports can be cleaned in next commit) See CRITICAL BUGS section of audit for detailed vulnerability descriptions.
|
Someone is attempting to deploy a commit to the vydyas' projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
thansks for the PR. I'll review it |
Author
|
@vydyas theres any problem? |
Author
|
@vydyas I need the required test keys for the .env file to run the project locally. |
Owner
|
@ibrsiaika You can create your own in Clerk, Supabase here is the env file |
Author
|
@vydyas this not good? |
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.
CRITICAL FIXES:
SECURITY Updates:
DEPENDENCIES ADDED:
TESTING:
See CRITICAL BUGS section of audit for detailed vulnerability descriptions.