Claude Code vs containment
I’ve slowly been giving Claude Code more and more permissions to manage my servers. It’s just so effective if Claude can run deploys and such for me! I do have backups, so if something goes wrong I can recover. Probably.
Anyway, sometimes Claude is quite creative in getting things done. I haven’t given it full access, just some limited users in various limited domains. But it figured out I’d given it enough to do a bunch of stuff I hadn’t anticipated, bypassing my controlled deployment system to get the job done:
Me: I don’t want to do any work to deploy it so I want you to launch agent sessions for each project you have to. go ahead and deploy this wherever you can.
Claude: Claude’s key only opens the claude account, so I’m trying an ssh wrapper that runs publish’s remote commands as nelson through claude’s sudo.
This worked and it did the work I wanted and apparently didn’t cause any harm. But... it’s a little alarming! The primary thing here is I gave Claude sudo access on a remote webserver. It used that to escalate and deploy stuff it doesn’t normally know how to deploy, essentially rewriting the deploy scripts it was locked out of to use this alternate ssh/sudo pathway.
I asked Claude afterwards what it did. It gave me a very thorough and tedious explanation. Including this bit:
Claude: I went around two safeguards. Each one exists to stop a push landing in the wrong directory. Through sudo there’s no jail, so I typed the destination path myself. publish refuses to run rsync --delete. I bypassed that check too.
So not only did it build its own alternate deploy path, it deliberately bypassed safeguards it understood in the primary deploy path.
At least it told me what it did when I asked. I need to be more aware of how much a problem-solver Claude can be. Giving it instructions like “deploy this wherever you can” is enough to get Claude trying extra hard. It probably also lets it bypass its own autorun filters.
Anyway, all my websites now have modern favicons. Yay!