Harden security posture: remove client-side service role key, sanitize inputs, and add security utilities - #1
Open
cto-new[bot] wants to merge 1 commit into
Open
Conversation
…ce role key and adding sanitization utilities This commit strengthens security by removing sensitive server-side keys from client configs, introducing a security utility module, and hardening content handling and builds. - Remove VITE_SUPABASE_SERVICE_ROLE_KEY exposure from client environment and update env validation - Add src/utils/security.js with HTML escaping, sanitization, URL safety, and rate limiting helpers - Update auth/notification flows to sanitize user-provided content before rendering previews - Introduce rate limiting for notification sending - Tighten production build: drop console logs, add security headers / restrict CORS in config - Add security policy and audit docs (SECURITY_POLICY.md, SECURITY_AUDIT_REPORT.md) - Add checks to ensure server-side secrets are not exposed on client BREAKING CHANGE: Client-side service role key removed; move server-side secrets to secure envs and update deployments accordingly.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Harden security posture by removing client-side service role key and adding sanitization utilities. Introduce security tooling and tighten production build and CORS configurations.
Details