The Secrets Left Behind After an Outsourced Project
When a system is handed over, the screens and features end up in the handover document. The secrets usually don't. Database passwords and API keys for payments or SMS stay where they were: in config files in the repository, in `.env` files on servers, and in messenger chats where someone pasted them.
The bigger problem is that the keys don't change when the people do. Even after you switch vendors or a developer leaves, it is common to find the production database password unchanged for years. A contractor whose engagement ended long ago can, technically, still reach your production data.
How Secrets Leak
Security firm GitGuardian counted roughly 23.8 million secrets exposed on public GitHub in 2024 alone. Private repositories aren't immune either. The more people who have access, the wider the exposure.
Sharing the same keys between production and development makes things worse. Compromise one loosely protected dev server and production opens up with it. Issuing separate keys per environment should be the baseline.
Levels of Secret Storage
Realistic Options by Company Size
Designing Key Rotation
The main reason teams put off rotation is fear of an outage. The moment a password changes, every server still using the old value fails to connect. Running two keys at once avoids this.
For databases, alternating between two accounts with identical privileges (say, `app_a` and `app_b`) is simple and reliable.
Set rotation intervals by risk. For example, rotate production database and payment keys every 90 days and internal integration keys every 180 days. Keys that can rotate automatically can go even shorter. More important than the interval is an emergency rotation procedure. If you suspect exposure: (1) issue and deploy a new key, (2) revoke the old one, (3) review access logs for the exposure window, and (4) clean up the repository history. Clones may already exist, so rotate first and scrub history second. Write this procedure down ahead of time and rehearse it at least once.
Least Privilege and Access Logging
A Checklist for Today
At POLYGLOTSOFT, our subscription development service designs this in from day one: secrets kept out of the repository, separate keys per environment, and a dedicated account for each application. After delivery, our SM (maintenance) plans take on the ongoing operational work, including scheduled key rotation, repository secret scanning, and full key rotation at every handover. If you're unsure how your current system handles its secrets, reach out through our contact page for a consultation.
