News for hackers. Stuff that matters.
Re:Show HN: A context-aware permission guard for Claude Code by binwiederhier on Wednesday March 11, 2026 @09:32PM (#47345119)
I love how everyone is trying to solve the same problems, and how different the solutions are.

I made this little Dockerfile and script that lets me run Claude in a Docker container. It only has access to the workspace that I'm in, as well as the GitHub and JIRA CLI tool. It can do whatever it wants in the workspace (it's in git and backed up), so I can run it with --dangerously-skip-permissions. It works well for me. I bet there are better ways, and I bet it's not as safe as it could be. I'd love to learn about other ways that people do this.

https://github.com/binwiederhier/sandclaude

Re:Show HN: A context-aware permission guard for Claude Code by bryanlarsen on Wednesday March 11, 2026 @10:37PM (#47345688)
> as well as the GitHub and JIRA CLI tool

That's a pretty powerful escape hatch. Even just running with read-only keys, that likely has access to a lot of sensitive data....

Re:Show HN: A context-aware permission guard for Claude Code by schipperai on Thursday March 12, 2026 @05:45AM (#47348435)
100% - lots of commands with server side effects out there
Re:Show HN: A context-aware permission guard for Claude Code by binwiederhier on Thursday March 12, 2026 @11:16AM (#47351912)
My co-worker figured out a way to run the GitHub CLI with read-only keys restricted to specific repos. I need to do that still.
Re:Show HN: A context-aware permission guard for Claude Code by mehdibl on Wednesday March 11, 2026 @09:48PM (#47345256)
Lovely you discovered devcontainers.
Re:Show HN: A context-aware permission guard for Claude Code by schipperai on Wednesday March 11, 2026 @10:09PM (#47345441)
Nice! Docker is a solid approach. Actual isolation is the ultimate protection. nah and sandclaude are complementary - container handles OS boundaries, and nah adds the semantic layer. git push --force is risky even inside the container
Re:Show HN: A context-aware permission guard for Claude Code by pragmatick on Thursday March 12, 2026 @04:39AM (#47348018)
I thought "I know that username". I love ntfy, thanks for developing it.
Re:Show HN: A context-aware permission guard for Claude Code by binwiederhier on Thursday March 12, 2026 @11:17AM (#47351924)
I love that you love it. That's why I do it. :-)
Re:Show HN: A context-aware permission guard for Claude Code by schipperai on Thursday March 12, 2026 @06:38AM (#47348830)
hey - ntfy is very cool! kudos and thanks :)
Re:Show HN: A context-aware permission guard for Claude Code by binwiederhier on Thursday March 12, 2026 @11:23AM (#47352070)
Thanks.
Re:Show HN: A context-aware permission guard for Claude Code by bryanlarsen on Thursday March 12, 2026 @11:10AM (#47351787)
Have you isolated the container from the Internet?
Re:Show HN: A context-aware permission guard for Claude Code by binwiederhier on Thursday March 12, 2026 @11:15AM (#47351884)
I don't want to isolate the container from the Internet :-) I understand that this is not the safest possible way (exfiltrating is still possible, but I mostly work on open source anyway, so that's not an issue), but I think the convenience wins here.

That said, if you have suggestions that are not super inconvenient, please let me know.

My main goal with this was to make sure it cannot go wild on my own system.

Re:Show HN: A context-aware permission guard for Claude Code by niobe on Thursday March 12, 2026 @10:14PM (#47359927)
But is anthropic trying to solve it? The current permissions solution is unbelievably poor for a product with this much traction.
Re:Show HN: A context-aware permission guard for Claude Code by schipperai on Friday March 13, 2026 @09:38AM (#47364304)
They are releasing auto-mode soon. But that won't improve the underlying permission system, rather, it'll just delegate decisions to Claude. That's better than --dangerously-skip-permissions, but not great for those that want granular controls and are sensitive to the extra tokens spent.
Re:Show HN: A context-aware permission guard for Claude Code by kate23_human on Friday March 13, 2026 @08:45AM (#47363744)
Docker isolation is a good baseline, but the tricky part is usually the boundary between “safe filesystem access” and tools that can indirectly access secrets (git configs, environment variables, credential helpers, etc).

Even read-only access to a repo can leak quite a bit depending on what’s in the workspace. I’ve seen some teams run tools inside containers but mount a filtered workspace rather than the full project directory to reduce exposure.

Re:Show HN: A context-aware permission guard for Claude Code by schipperai on Friday March 13, 2026 @09:45AM (#47364392)
great callout - tool call can have side-effects outside your box. So unless you run a sandbox with no internet access, you aren't ever 100% safe.

nah does guard some of this - reading .env or ~/.aws/credentials gets flagged, and Write/Edit content is inspected for secrets before it leaves the tool.

Docker + filtered mounts + something like nah on top is a solid layered approach that is still practical.

Re:Show HN: A context-aware permission guard for Claude Code by nicwolff on Saturday March 14, 2026 @11:39AM (#47377769)
Yeah, same – mine gives Claude a proxy to the host's Docker socket that disallows mounting anything outside the dev dirs or starting a --privileged container, so it can run tests.

https://github.com/nicwolff/claude-container/