Secret (API key, รหัสผ่าน, token, encryption key) ต้องถูกจัดการอย่างปลอดภัย โดยห้าม hardcode ไว้ในโค้ดหรือ commit เข้า version control เด็ดขาด แต่ต้องจัดเก็บและเข้าถึงอย่างปลอดภัย การจัดการ secret ที่ไม่ดีเป็นแหล่งของการละเมิดที่พบบ่อยและร้ายแรง
กฎสำคัญที่สุด: ห้าม hardcode หรือ commit secret
❌ NEVER hardcode secrets in source code or commit them to Git:
→ committed secrets are in the repo HISTORY (exposed even if "removed" later)
→ public repos / leaks expose them to attackers (bots scan GitHub for keys constantly)
→ a TOP cause of breaches (leaked AWS keys, database passwords, API tokens)
⚠️ If a secret IS committed/leaked → ROTATE it immediately (it's compromised)
