Secretele (chei API, parole, jetoane, chei de criptare) trebuie gestionate în mod securizat — niciodată hardcodate în cod sau commituite în controlul versiunilor, ci stocate și accesate în siguranță. Gestionarea deficitară a secretelor este o sursă comună și serioasă de breșe.
Regula cardinală: niciodată nu hardcoda sau nu comite secrete
❌ 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)
