Thuta Learning
Digital Privacy & Modern Security
AdvancedSecurityintermediate

AI Security နှင့် Vibe Coding Security

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • AI Security နှင့် Vibe Coding Security concept ကို နားလည်ရှင်းပြနိုင်ရန်
  • Diagram/checklist ကို ဖတ်ပြီး threat/control/decision ဘယ်လို ဆက်စပ်နေသလဲ ခြေရာခံနိုင်ရန်
  • ကိုယ့် digital life (သို့) developer workflow မှာ ဘယ်လို အသုံးချသင့်သလဲ ရှင်းပြနိုင်ရန်

နားလည်ထားရမယ့် အချက်

prompt ထဲ ဘာထည့်လိုက်လဲဆိုတာ သတိထားပါ—sensitive credential (သို့) confidential data ကို AI tool ဆီ ပို့လိုက်ရင် log ချ၊ retain ခံရနိုင်တယ်၊ ထိန်းချုပ်ဖို့ ခက်ခဲနိုင်တယ်။

AI output က ယုံကြည်စိတ်ချစွာ မှားနိုင်တယ်။ Hallucination ဆိုတာ model တစ်ခုက fabricated fact (သို့) insecure pattern တစ်ခုကို မှန်ကန်တဲ့အရာလို tone တူတူနဲ့ ပြောနိုင်တာပါ။

AI agent တွေက file (သို့) system access ကို ကန့်သတ်မှုမရှိဘဲ အလိုအလျောက် ရသင့်တာ မဟုတ်ပါဘူး—human account အတွက် သုံးတဲ့ least-privilege thinking အတိုင်းပဲ AI agent အတွက်လည်း အသုံးချရမယ်။

Prompt injection — awareness ပဲ

AI ထဲ ကျွေးထည့်လိုက်တဲ့ untrusted content (webpage, document, user message) က instruction ဝှက်ထည့်ပြီး AI ရဲ့ behavior ကို manipulate လုပ်ဖို့ ကြိုးစားနိုင်တယ်။ AI ကို ကျွေးထည့်တဲ့ content ကို တခြား untrusted input လိုပဲ သဘောထားပါ။

Vibe coding မှာ တကယ့် security workflow တစ်ခု လိုအပ်တယ်—ထွက်လာတာကို လက်ခံရုံသက်သက် မဟုတ်ပါဘူး။

AI က code generate လုပ်

အစပိုင်း—ပြီးသားထုတ်ကုန်မဟုတ်ဘဲ draft တစ်ခုအဖြစ် သဘောထားပါ။

Developer က diff review လုပ်

human တစ်ဦးက ဘာပြောင်းလဲသွားလဲ တကယ်ဖတ်တယ်။

Security checklist

Auth, authz, secrets, database rules, API exposure, input validation, dependencies—ရှင်းရှင်းလင်းလင်း check လုပ်တယ်။

Test, ပြီးမှ deploy

automated test run လုပ်ပြီးမှသာ deploy လုပ်တယ်။

ရှင်းရှင်းလင်းလင်း ပြောရရင်—code ကို AI generate လုပ်တယ်ဆိုတာ secure ဖြစ်တယ်ဆိုတာ ဘာမှ မဆိုလိုပါဘူး။ အဆုံးအဖြတ်က review လုပ်တဲ့ human ဆီမှာပဲ ဆက်ရှိနေတယ်။

text
VIBE CODING SECURITY WORKFLOW
-----------------------------
AI GENERATES CODE
   |
   v
DEVELOPER REVIEWS THE ACTUAL DIFF
   |
   v
SECURITY CHECKLIST
   auth | authz | secrets | db-rules | API exposure
   input validation | dependencies
   |
   v
AUTOMATED TESTS RUN
   |
   v
SECURITY REVIEW (human sign-off)
   |
   v
DEPLOY
(AI generated it != secure by default)

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

အောက်က function က vibe-coding security workflow ကို deploy မလုပ်ခင် ရှင်းရှင်းလင်းလင်း gate တစ်ခုအဖြစ် encode လုပ်ပေးတယ်—checklist category တစ်ခုစီအတွက် boolean၊ test pass ဖြစ်လားဆိုတာပါ။

partial credit ဆိုတာ မရှိပါဘူး—item အားလုံး ရှင်းရှင်းလင်းလင်း check ဖြစ်မှသာ readyToDeploy က true ဖြစ်တယ်။

မပြင်ဆင်ရသေး

authorization, database rules, input validation တွေ check မဖြစ်သေးဘူး—readyToDeploy false, missing array က သုံးခုစလုံး ဖော်ပြတယ်။

အသင့်ဖြစ်

category အားလုံး test pass အပါအဝင် check ဖြစ်ပြီးသား—readyToDeploy true.

"ကြည့်ရတာ ကောင်းပြီ AI က ယုံကြည်စိတ်ချပုံပေါ်တယ်" ဆိုတာကို complete security review တစ်ခု ပြီးပြီလို့ ဘယ်တော့မှ အလွဲ မထင်ပါစေနဲ့—ဒီလို check ကို real review process ထဲ ထည့်ပါ။

AI generate လုပ်တာနဲ့ default secure ဖြစ်တာ မတူပါ

AI ကနေ generate လုပ်တယ်ဆိုတာ default အားဖြင့် secure ဖြစ်တယ်လို့ မဆိုလိုပါ။ deploy မလုပ်ခင် checklist ပေါ်က category တစ်ခုချင်းစီကို ရှင်းရှင်းလင်းလင်း အတည်ပြုရမယ်။

အတူတူ စမ်းရေးကြည့်မယ်

javascript
function assessVibeCodedChange(review) {
  const checklist = {
    authenticationChecked: review.authenticationChecked,
    authorizationChecked: review.authorizationChecked,
    secretsChecked: review.secretsChecked,
    dbRulesChecked: review.dbRulesChecked,
    apiExposureChecked: review.apiExposureChecked,
    inputValidationChecked: review.inputValidationChecked,
    dependenciesChecked: review.dependenciesChecked,
    testsPassing: review.testsPassing,
  };

  const missing = Object.entries(checklist)
    .filter(([, done]) => !done)
    .map(([item]) => item);

  return {
    readyToDeploy: missing.length === 0,
    missing,
    note: "AI generated it does not mean secure by default — every item must be explicitly checked.",
  };
}

const notReady = assessVibeCodedChange({
  authenticationChecked: true, authorizationChecked: false, secretsChecked: true,
  dbRulesChecked: false, apiExposureChecked: true, inputValidationChecked: false,
  dependenciesChecked: true, testsPassing: true,
});

const ready = assessVibeCodedChange({
  authenticationChecked: true, authorizationChecked: true, secretsChecked: true,
  dbRulesChecked: true, apiExposureChecked: true, inputValidationChecked: true,
  dependenciesChecked: true, testsPassing: true,
});

console.log("Not ready:");
console.log(JSON.stringify(notReady, null, 2));
console.log("\nReady:");
console.log(JSON.stringify(ready, null, 2));
You should see
Not ready:
{
  "readyToDeploy": false,
  "missing": [
    "authorizationChecked",
    "dbRulesChecked",
    "inputValidationChecked"
  ],
  "note": "AI generated it does not mean secure by default — every item must be explicitly checked."
}

Ready:
{
  "readyToDeploy": true,
  "missing": [],
  "note": "AI generated it does not mean secure by default — every item must be explicitly checked."
}

၅ မိနစ် စမ်းကြည့်

assessVibeCodedChange ထဲ ကိုးခုမြောက် checklist category "outputEncodingChecked" ကို ထည့်ပါ—AI-generated code က user-controlled data ကို render လုပ်တဲ့အခါ လုံခြုံစွာ handle လုပ်ကြောင်း အတည်ပြုတာကို ကိုယ်စားပြုပါစေ။ ဒီ field ပါအောင် example နှစ်ခုစလုံးကို ပြန် run ကြည့်ပြီး not-ready example က ဒါကိုပါ missing အဖြစ် ပြန်ဖော်ပြသလားဆိုတာ စစ်ဆေးပါ။

သတိလေးတစ်ချက်

confidential credential (သို့) customer data ကို နောက်ပိုင်း ဒီ data ဘယ်ရောက်မလဲဆိုတာ မစဉ်းစားဘဲ AI prompt ထဲ ထည့်ပို့ခြင်း။

authorization, secrets, input-validation review ရှင်းရှင်းလင်းလင်း မလုပ်ဘဲ AI assistant ကနေ ထွက်လာတဲ့ code ကို တိုက်ရိုက် deploy လုပ်ခြင်း။

OWASP Top 10 for Large Language Model ApplicationsDigital Privacy & Modern Security

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • confidential credential (သို့) customer data ကို နောက်ပိုင်း ဒီ data ဘယ်ရောက်မလဲဆိုတာ မစဉ်းစားဘဲ AI prompt ထဲ ထည့်ပို့ခြင်း။
  • authorization, secrets, input-validation review ရှင်းရှင်းလင်းလင်း မလုပ်ဘဲ AI assistant ကနေ ထွက်လာတဲ့ code ကို တိုက်ရိုက် deploy လုပ်ခြင်း။
  • ဒီ course က Cybersecurity Basics course အသစ် မဟုတ်ပါ — password/2FA/phishing/malware/encryption/backup အခြေခံကို Cybersecurity tutorial ကနေ လေ့လာပြီးသားလို့ ယူဆထားပါတယ်။ ဒီ course က Passkeys, Public Wi-Fi/VPN, Browser Security, Privacy, developer-focused Auth/API security, AI security လို အသစ်ထပ်ဖြည့်တဲ့ အပိုင်းကိုသာ သင်ပေးပါတယ်။

လေ့ကျင့်ခန်း

assessVibeCodedChange ထဲ ကိုးခုမြောက် checklist category "outputEncodingChecked" ကို ထည့်ပါ—AI-generated code က user-controlled data ကို render လုပ်တဲ့အခါ လုံခြုံစွာ handle လုပ်ကြောင်း အတည်ပြုတာကို ကိုယ်စားပြုပါစေ။ ဒီ field ပါအောင် example နှစ်ခုစလုံးကို ပြန် run ကြည့်ပြီး not-ready example က ဒါကိုပါ missing အဖြစ် ပြန်ဖော်ပြသလားဆိုတာ စစ်ဆေးပါ။

You'll know it worked when: Not ready: { "readyToDeploy": false, "missing": [ "authorizationChecked", "dbRulesChecked", "inputValidationChecked" ], "note": "AI generated it does not mean secure by default — every item must be explicitly checked." } Ready: { "readyToDeploy": true, "missing": [], "note": "AI generated it does not mean secure by default — every item must be explicitly checked." }

AI Security နှင့် Vibe Coding Security | Thuta Learning