ایک Node app کو محفوظ بنانے کا مطلب ہے متعدد layers پر عام web vulnerabilities (OWASP Top 10) کے خلاف دفاع کرنا — input handling، authentication، dependencies، اور configuration۔ Security layered ہے (defense in depth)، کوئی واحد fix نہیں۔
1. تمام input کی validation اور sanitize کریں
{ z } ;
schema = z.({ : z.().(), : z.().() });
data = schema.(req.);
