Live data from Hacker News

Claude Code wiped our production database with a Terraform command

twitter.com

131–140 of 167 posts

Re: Claude Code wiped our production database with a Terraform command

#132

To think I used to find Silicon Valley a bit too much on the nose: https://www.youtube.com/watch?v=m0b_D2JgZgY

Hah, perfect... some variation of "From now on [your AI tool of choice] is banned. Just write code like a normal human f*king being, please." has probably already been used in the real world recently.

Re: Claude Code wiped our production database with a Terraform command

#133

Earlier quoted context omitted.

I’m going to defend Claude. If you give a robot the ability to delete production it’s going to delete production. This is 100% the user’s fault. This problem has not yet been solved and will never be solved .

> If you give a robot the ability to delete production it’s going to delete production If you give an intern the ability to delete production, it's going to delete production. But to be honest you can as well replace "intern" or "robot" by human in general. Deletion in production should have safety layers that anyone cannot accidentally do it, specially without the ability of rolling back.

I had a senior tech lead delete production doing a late night quick fix. Especially in panic mode where sometimes processes are ignored, things are going to go wrong. Don't need interns for that, nor llms.

Re: Claude Code wiped our production database with a Terraform command

#134

Earlier quoted context omitted.

> If you give a robot the ability to delete production it’s going to delete production If you give an intern the ability to delete production, it's going to delete production. But to be honest you can as well replace "intern" or "robot" by human in general. Deletion in production should have safety layers that anyone cannot accidentally do it, specially without the ability of rolling back.

I think the difference, though maybe I'm incorrect, is that when we have interns on our codebase they get restricted permissions. Can't push to prod, need pull requests with approvals and reviews, etc. Certainly can't delete backups. Whoever setup the robot's permissions did it wrong. Which is interesting because early on there were people complaining that these AIs refused to push to main, but now this stuff keeps h…

> Whoever setup the robot's permissions did it wrong.

It doesn't have permissions of it's own. The way he's using it, it has his permissions.

Also, in order to be able to do deployments like that you need pretty wide permissions. Deleting a database is one of them, if you're renaming things for example. That stuff should typically not happen in prd though

Re: Claude Code wiped our production database with a Terraform command

#136
The ability to delete backups is wild. That simply should have have mfa on it by default. Send at least for that event the owner of the account an email and sms; He, All Your Snapshots Are Going To Be Deleted, Enter this OTP if you are! Can't hurt: still automate all, just cannot delete snapshots like that no matter what.

Re: Claude Code wiped our production database with a Terraform command

#137
post #134

Earlier quoted context omitted.

I think the difference, though maybe I'm incorrect, is that when we have interns on our codebase they get restricted permissions. Can't push to prod, need pull requests with approvals and reviews, etc. Certainly can't delete backups. Whoever setup the robot's permissions did it wrong. Which is interesting because early on there were people complaining that these AIs refused to push to main, but now this stuff keeps h…

> Whoever setup the robot's permissions did it wrong. It doesn't have permissions of it's own. The way he's using it, it has his permissions. Also, in order to be able to do deployments like that you need pretty wide permissions. Deleting a database is one of them, if you're renaming things for example. That stuff should typically not happen in prd though

That was my first guess but I wasn't sure. I've seen AIs as authors on things. So yeah that's even worse. You don't give the intern your credentials.

Re: Claude Code wiped our production database with a Terraform command

#138
Once again there’s another horror story from someone who doesn’t use punctuation. I’d love to see the rest of the prompts; I’d bet real cash they’re a flavor of:

“but wont it break prod how can i tell”

“i don want yiu to modify it yet make a backup”

“why did you do it????? undo undo”

“read the file…later i will ask you questions”

Every single story I see has the same issues.

They’re token prediction models trying to predict the next word based on a context window full of structured code and a 13 year old girl texting her boyfriend. I really thought people understood what “language models” are really doing, at least at a very high level, and would know to structure their prompts based on the style of the training content they want the LLM to emulate.

Re: Claude Code wiped our production database with a Terraform command

#139
post #120

Earlier quoted context omitted.

The difference is, an expert engineer would flat-out refuse to do these things and would keep pushing back. Claude may sometimes attempt _one time_ to warn someone, and then (after consent fatigue means they're just blindly clicking "yes"), it ploughs right ahead without further complaint.

Do you really want the Ai to not do the things you tell it? It only knows what you tell it, if you tell it risky operations are OK, what do you expect?

That depends.

As per my root comment, if you ignore a lot of the marketing of AI and view it as just a tool, then I agree with your point about it doing what you tell it but I still want the tool to help me avoid making mistakes (and I’d like it to work quite hard at that - much harder, it seems, than it currently does). And probably to the extent that it refuses to run dangerous commands for me and tells me to copy/paste them and run them myself if I really want to take the risk.

If, however, we swallow the marketing hook, line and sinker: then yeah, I want the AI to behave like the experienced engineer it’s supposed to be.

Re: Claude Code wiped our production database with a Terraform command

#140

Earlier quoted context omitted.

> If you give a robot the ability to delete production it’s going to delete production If you give an intern the ability to delete production, it's going to delete production. But to be honest you can as well replace "intern" or "robot" by human in general. Deletion in production should have safety layers that anyone cannot accidentally do it, specially without the ability of rolling back.

I had a senior tech lead delete production doing a late night quick fix. Especially in panic mode where sometimes processes are ignored, things are going to go wrong. Don't need interns for that, nor llms.

Which is why I actually said replace intern or robot by "human" in general in my comment.
Post reply on HN