Security Audit
AI से अपने app की security posture की समीक्षा कराएँ, नीचे दी गई best practices अपनाएँ, और secrets को Settings page में रखें।
Proyecta में security का काम platform defaults, AI-driven reviews, और कुछ आदतों के मेल से होता है जो आपको बनानी चाहिए। इसे इस तरह समझें।
Security audit चलाएँ
Section titled “Security audit चलाएँ”Command Palette (Cmd+K / Ctrl+K) खोलें और Run Security Audit चुनें। इससे AI को एक व्यापक security prompt भेजा जाता है, जो आपका पूरा codebase पढ़कर प्राथमिकता के अनुसार findings और specific fixes के साथ कमज़ोरियाँ सामने रखता है।
Audit इन चीज़ों की जाँच करता है:
- Source files में hardcoded API keys, tokens, या passwords
VITE_-prefix वाले env vars जो secrets को client तक leak करते हैं- API endpoints पर missing server-side input validation
- Pages या API endpoints जहाँ authentication नहीं है
- Unescaped user content (XSS risks)
- Dependency vulnerabilities
- Mixed content या hardcoded
http://URLs - Missing file upload validation
आप chat से manually भी security audit चला सकते हैं, या किसी specific क्षेत्र तक सीमित कर सकते हैं:
"Review my checkout flow for security issues""Check the admin pages — who can access what?""Look at every endpoint that writes to the database and tell me if any of them are missing authorization"
Security best practices
Section titled “Security best practices”Secrets को सुरक्षित रखें
- हर API key, database credential, और third-party token को Settings page के Environment Variables section में store करें
- Secrets को chat messages में paste न करें और न ही code में commit करें
- अगर कोई secret expose हो जाए, तो उसे third-party provider के पास तुरंत revoke करें और नया बनाएँ
Access सीमित करें
- अपने app में role-based permissions लागू करें (
"Add admin and member roles. Only admins can access /admin pages.") - Sensitive pages और endpoints को केवल authenticated users तक सीमित रखें
- User input को हमेशा server side पर validate करें, केवल client पर नहीं
हर जगह HTTPS इस्तेमाल करें
- सभी published Proyecta apps automatically HTTPS पर serve होते हैं
- SSL certificates आपके लिए provision और renew किए जाते हैं
- Custom domains के लिए भी यही लागू होता है, जब DNS सही तरह से point हो जाए
Dependencies अपडेट रखें
- AI से समय-समय पर पूछें:
"Check my dependencies for known security vulnerabilities and upgrade the vulnerable ones." - AI जो बदलाव करे उन्हें ध्यान से देखें — dependency upgrades में कभी-कभी breaking changes भी होते हैं
बड़े बदलावों के बाद audit करें
- Authentication, payments, file uploads, या user data से जुड़ी कोई भी चीज़ जोड़ने के बाद audit दोबारा चलाएँ
- पहली बार production पर publish करने से पहले एक बार पूरी तरह जाँच करें
Proyecta आपके लिए क्या संभालता है
Section titled “Proyecta आपके लिए क्या संभालता है”- आपके
*.proyecta.livesubdomain के लिए HTTPS और certificates - Environment variables — secrets एक dedicated secrets store में रखे जाते हैं और आपके app के backend (Convex) से sync होते हैं, कभी भी codebase में commit नहीं होते। ध्यान दें: secrets उन workspace members को दिखते हैं जिनके पास project access है।
- Isolated runtimes — हर project अपने container में चलता है, इसलिए dev-environment की समस्याएँ दूसरे users को प्रभावित नहीं करतीं
- पहली बार publish करने से पहले audit चलाएँ — एक पूरी जाँच, live होने से पहले समस्याएँ पकड़ लेती है।
- बड़े बदलावों के बाद दोबारा चलाएँ — auth, payments, या file uploads जोड़ने से नई attack surface बनती है।
- Scope सीमित करें — specific क्षेत्रों पर audit, पूरे app की जाँच से तेज़ और ज़्यादा गहरी होती है।