Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Stripe payment integration configuration to the production environment by introducing the VITE_STRIPE_PUBLISHABLE_KEY environment variable. However, there are critical security concerns with the implementation.
Key Changes:
- Added
VITE_STRIPE_PUBLISHABLE_KEYto.env.productionfor Stripe payment integration - Corrected line numbering for existing
VITE_DOMAINvariable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| VITE_DOMAIN=https://rc-store.benhalverson.dev | ||
| VITE_STRIPE_PUBLISHABLE_KEY=pk_test_51RUggnFtN1eiSjAecw8NdboDU4D9MjxRBIlKSQj2y78HuLDK7z1h26EfEp7RUpro2jdYvW9Uzu4FA6SHoiVOEg0o00rPmfffwj No newline at end of file |
There was a problem hiding this comment.
The Stripe publishable key should not be committed directly to version control, even in .env.production. According to the .gitignore, environment files like .env and .env.local are excluded, but .env.production is not.
Best practice is to inject this value via CI/CD environment variables or secrets management (e.g., GitHub Secrets, Cloudflare environment variables) rather than hardcoding it in version-controlled files. This prevents accidental exposure and allows different keys per deployment environment.
| VITE_DOMAIN=https://rc-store.benhalverson.dev | |
| VITE_STRIPE_PUBLISHABLE_KEY=pk_test_51RUggnFtN1eiSjAecw8NdboDU4D9MjxRBIlKSQj2y78HuLDK7z1h26EfEp7RUpro2jdYvW9Uzu4FA6SHoiVOEg0o00rPmfffwj | |
| VITE_DOMAIN=https://rc-store.benhalverson.dev |
| VITE_BASE_URL=https://api.benhalverson.dev | ||
| VITE_DOMAIN=https://rc-store.benhalverson.dev No newline at end of file | ||
| VITE_DOMAIN=https://rc-store.benhalverson.dev | ||
| VITE_STRIPE_PUBLISHABLE_KEY=pk_test_51RUggnFtN1eiSjAecw8NdboDU4D9MjxRBIlKSQj2y78HuLDK7z1h26EfEp7RUpro2jdYvW9Uzu4FA6SHoiVOEg0o00rPmfffwj No newline at end of file |
There was a problem hiding this comment.
A Stripe test key (indicated by the pk_test_ prefix) is being added to a production environment file. Production environments should use live Stripe keys (prefixed with pk_live_), not test keys. Test keys will not process real payments and could cause issues in production.
Replace this with a production-ready Stripe publishable key or use environment-specific configuration via CI/CD secrets.
| VITE_STRIPE_PUBLISHABLE_KEY=pk_test_51RUggnFtN1eiSjAecw8NdboDU4D9MjxRBIlKSQj2y78HuLDK7z1h26EfEp7RUpro2jdYvW9Uzu4FA6SHoiVOEg0o00rPmfffwj | |
| VITE_STRIPE_PUBLISHABLE_KEY=pk_live_REPLACE_WITH_YOUR_LIVE_KEY |
No description provided.