AAPEXIVEAI COMMUNITY
Security controls and deployment guidance

SECURITY & TRUST

Apexive မှာ code ဖြင့်ကာကွယ်ထားသည့်အချက်များနှင့် production server တွင် သီးခြားပြင်ဆင်ရမည့် security checklist ကို ဖော်ပြထားပါသည်။

View 01

Python backend security

Backend API နှင့် database layer တွင် အသုံးပြုထားသော ကာကွယ်မှုများ။

04 AREAS
01

ORM & parameterized queries

Database access တွင် SQLAlchemy ORM နှင့် bound parameters ကို အသုံးပြုထားပါသည်။ User input ကို SQL string ထဲ တိုက်ရိုက်ပေါင်းမထည့်ပါနှင့်။

Security guidance
02

CORS configuration

FastAPI တွင် ခွင့်ပြုထားသော origin များကို config ဖြင့်သတ်မှတ်ထားပါသည်။ Production domain များကိုသာ allowlist လုပ်ပါ။ CORS သည် login/authentication ကို အစားမထိုးပါ။

Security guidance
03

Pydantic input validation

Pydantic request schema များက type၊ စာလုံးအရေအတွက်နှင့် ဈေးနှုန်းအကွာအဝေးများကို server ပေါ်တွင် စစ်ဆေးပါသည်။ Browser validation သည် အဆင်ပြေစေရန်သာ ဖြစ်သည်။

Security guidance
04

Password hashing

Account password များကို Passlib မှတစ်ဆင့် bcrypt ဖြင့် hash လုပ်ထားပါသည်။ မူရင်း password ကို သိမ်းဆည်းခြင်း၊ log ထဲရေးခြင်း မလုပ်ပါနှင့်။

Security guidance
View 02

Frontend security

Browser တွင် data ပြသမှု၊ token နှင့် environment variable များအတွက် အချက်များ။

03 AREAS
01

XSS protection

React သည် text အဖြစ်ထည့်သွင်းထားသော data များကို ပုံမှန်အားဖြင့် escape လုပ်ပါသည်။ မယုံကြည်ရသော HTML ကို တိုက်ရိုက်မပြသပါနှင့်၊ server ပေါ်တွင်လည်း ပြန်စစ်ပါ။

Security guidance
02

Token & cookie management

လက်ရှိ access token ကို browser localStorage ထဲတွင် သိမ်းထားပြီး HttpOnly cookie မဟုတ်သေးပါ။ ပိုမိုလုံခြုံရန် Secure၊ HttpOnly၊ SameSite cookie နှင့် CSRF ကာကွယ်မှုသို့ ပြောင်းရန်လိုပါသည်။

Security guidance
03

Environment variable protection

Database credential နှင့် signing key များကို server ဘက်တွင်သာထားပါ။ NEXT_PUBLIC_ variable များကို browser သို့ပို့သည်။ Secret များကို ထိုနေရာတွင်မထားပါနှင့်၊ .env file များကို source control ထဲမတင်ပါနှင့်။

Security guidance
View 03

Infrastructure & transport security

Production hosting တွင် သီးခြားစစ်ဆေးပြီး configure လုပ်ရမည့်အချက်များ။

02 AREAS
01

HTTPS / TLS everywhere

Website နှင့် API traffic အားလုံးကို HTTPS/TLS ဖြင့်ပို့ပါ။ Hosting သို့မဟုတ် proxy အဆင့်တွင် HTTP မှ HTTPS သို့ redirect နှင့် HSTS ကို configure လုပ်ပါ။

Security guidance
02

Reverse proxy & WAF

FastAPI ရှေ့တွင် Nginx သို့မဟုတ် Cloudflare WAF ထားပြီး origin server ကို တိုက်ရိုက်ဝင်ရောက်မှုကန့်သတ်ပါ။ Rate limit နှင့် ယုံကြည်ရသော proxy header များကို သတ်မှတ်ပါ။ DDoS ကာကွယ်မှုသည် အန္တရာယ်ကိုလျှော့ချခြင်းသာဖြစ်ပြီး အပြည့်အဝတားဆီးနိုင်မည်ဟု အာမမခံနိုင်ပါ။

Security guidance