Run your shit in firejail or bubblewrap. On mac you can use this: https://github.com/neko-kai/claude-code-sandbox