Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
41–50 of 72 posts
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#42Just put it in a container. I use bash aliases like this to start a throwaway container with bind mounted cwd, works like a charm with rootless podman. I also learned to run npm and other shady tools in this way and stopped worrying about supply chain attacks. alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"' alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'
1 - https://news.ycombinator.com/item?id=45766478
2 - http://github.com/ashishb/amazing-sandboxRe: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#43It’s still WIP but the core sandbox works. Feedback greatly appreciated: https://github.com/corv89/shannot
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#44Just put it in a container. I use bash aliases like this to start a throwaway container with bind mounted cwd, works like a charm with rootless podman. I also learned to run npm and other shady tools in this way and stopped worrying about supply chain attacks. alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"' alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'
I really struggle to understand how this isn't common best practice at this point.
Especially when it comes to agents and anything node related.
Claude is distributed as an npm global, so doubly true.
Takes about 5 minutes to set this up.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#45Just put it in a container. I use bash aliases like this to start a throwaway container with bind mounted cwd, works like a charm with rootless podman. I also learned to run npm and other shady tools in this way and stopped worrying about supply chain attacks. alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"' alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'
I do that, too! I use git for version control outside the docker container, and to prevent claude from executing arbitrary code through commit hooks, I attach the docker volume mount in a nested directory of the repository so claude can not touch .git. Are there any other attack vectors that I should watch out for?
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#46Two MCP tools back to back on the HN frontpage when seemingly dozens of them doing the same functionality already exist. Both posts written by AI with the typical tells. Daring today aren't we?
AI slop articles taking over HN would be the best possible outcome, then maybe we could ban all of it.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#47In my opinion this is a solution at the wrong layer. It's working by trying to filter executed commands, but it doesn't work in many cases (even in 'strict mode'), and there's better, more complete, solutions. What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them. When claude code has trouble running…
Exactly right, well said. None of these solutions work in this case for the reasons you outlined. It will just as easily get around it by running it as a bash command or any number of ways.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#48In my opinion this is a solution at the wrong layer. It's working by trying to filter executed commands, but it doesn't work in many cases (even in 'strict mode'), and there's better, more complete, solutions. What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them. When claude code has trouble running…
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#49Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#50In my opinion this is a solution at the wrong layer. It's working by trying to filter executed commands, but it doesn't work in many cases (even in 'strict mode'), and there's better, more complete, solutions. What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them. When claude code has trouble running…
https://gist.github.com/fragmede/96f35225c29cf8790f10b1668b8...