Date: 2026-03-27
We have identified that sensitive API credentials were accidentally committed to the git repository and are present in the git history.
The following credentials were exposed in the git history in the .env file:
-
Supabase Credentials:
NEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SECRET_KEY
-
Resend API Key:
RESEND_API_KEY
You must rotate your Supabase API keys immediately:
- Log in to your Supabase dashboard at https://supabase.com
- Navigate to your project
- Go to Settings → API
- Click Reveal secrets
- Generate a new service role key (replace the exposed
SUPABASE_SECRET_KEY) - If needed, generate a new
anon key(replaceNEXT_PUBLIC_SUPABASE_ANON_KEY) - Update your local
.envfile with the new keys
Supabase Documentation: https://supabase.com/docs/guides/api/api-keys
You must rotate your Resend API key:
- Log in to your Resend dashboard at https://resend.com
- Navigate to API Keys
- Click Create API Key
- Give it a name (e.g., "production-rotated")
- Copy the new API key
- Replace the exposed key in your local
.envfile - Delete the old exposed API key
Resend Documentation: https://resend.com/docs/dashboard/api-keys
After rotating keys, update your .env file with the new credentials:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_new_anon_key
SUPABASE_SECRET_KEY=your_new_secret_key
# Resend
RESEND_API_KEY=your_new_resend_key
RESEND_FROM_EMAIL=your_from_emailThe following security improvements have been made to prevent future incidents:
- Added
.envto.gitignore- Prevents accidental commits - Added authentication checks to API endpoints that return sensitive data
- Added input validation for cookie parsing to prevent injection attacks
- Standardized error responses to prevent information leakage
After rotating credentials, audit your systems for any suspicious activity:
- Check Supabase logs for unauthorized access attempts
- Check Resend sending history for unauthorized emails
- Review any database changes made by unauthorized users
- Monitor for unusual API usage patterns
Ensure all team members:
- Are aware of this security incident
- Update their local
.envfiles with the new rotated keys - Understand the importance of never committing
.envfiles - Use environment-specific configuration files (
.env.local,.env.production.local)
- GitHub Documentation: Removing sensitive data from a repository
- Supabase Security Best Practices
- Next.js Environment Variables Documentation
If you have questions about this security incident or need help rotating credentials, please contact your security team or system administrator.
Remember: Never commit .env files or any files containing secrets to version control. Always use environment variables and keep sensitive data out of your repository.