| ▲ | hamasho 5 hours ago | |
The worst blunder I made was when I explored cloud resources to improve the product's performance. I created a GCP project (my-app-dev) for exploring how to scale up the cloud service. I added several resources to mock the production, like compute instances/cloud SQL/etc, then populated the data and run several benchmarks. I changed the specs, number of instances and replicas, and configs through gcloud command.
But for some reason, at one point codex asked to list all projects;
I couldn't understand the reason, but it seemed harmless so I approved the command.
And after this, for whatever reason it changed the target project from the dev (my-app-dev) to the production (my-app) without asking or me realizing.Of course I checked every commands. I couldn't YOLO while working on cloud resources, even in dev environment. But I focused on the subommands and its content and didn't even think it had changed the project ID along the way. It continued to suggest more and more aggressive commands for testing, and I approved them brain-deadly...
It took a shamefully long time to realize codex was actually operating on production, so I DDoSed and SQL-injected to the production...Fortunately, it didn't do anything irreversible. But it was one of the most terrifying moments in my career. | ||
| ▲ | EdNutting 5 hours ago | parent [-] | |
This is part of the reason deployments to production cloud environments should: 1. Only be allowed via CI/CD 2. All infra should be defined as code 3. Any deployment to production should be a delayed process that also has a human-approval step in the workflow (at least one, if not more) (Exactly where that review step is placed depends on your organisation - culture, size, etc.) And anyone that does need to touch production should do so from an isolated VM with temporary credentials. Developers shouldn't routinely have production access from their terminal. This last aspect is easy and cheap to set up on AWS. I presume it's also possible in Google Cloud. | ||