الأسرار (مفاتيح API، كلمات المرور، الرموز، مفاتيح التشفير) يجب أن تُدار بشكل آمن — لا تُكتب أبداً بشكل مباشر في الكود أو تُرسل إلى نظام التحكم بالإصدارات، بل تُخزّن وتُستقبل بأمان. الإدارة الضعيفة للأسرار هي مصدر شائع وخطير للاختراقات.
القاعدة الأساسيّة: لا تكتب الأسرار بشكل مباشر أو ترسلها إلى نظام التحكم
❌ 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)
