惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
博客园_首页
宝玉的分享
宝玉的分享
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
T
Tailwind CSS Blog
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
罗磊的独立博客
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
阮一峰的网络日志
阮一峰的网络日志
I
InfoQ
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Scott Helme
Scott Helme
B
Blog
M
MIT News - Artificial intelligence
K
Kaspersky official blog
H
Help Net Security
V
Vulnerabilities – Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
Engineering at Meta
Engineering at Meta
博客园 - 【当耐特】
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
Project Zero
Project Zero
The Hacker News
The Hacker News
B
Blog RSS Feed
T
Tor Project blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Run Claude Code's --dangerously-skip-permissions Safely with Docker
Oleksii Trek · 2026-05-04 · via DEV Community

Claude Code's --dangerously-skip-permissions flag skips per-action approvals — a real productivity boost. The downside: with permissions skipped, Claude can read everything in your home directory, run any command, and modify any file outside your project.

The claude-pod is a small, unofficial Docker sandbox that wraps Claude Code so it can only see the project folder you launched it from. Four files, MIT-licensed, Docker as the only host requirement. Below is the full README — what it does, what it doesn't protect, and how to use it.

Install & Run

# Clone this repo (once)
git clone https://github.com/trekhleb/claude-pod.git ~/tools/claude-pod

# Build claude-pod Docker image (once)
cd ~/tools/claude-pod && ./install.sh

# Navigate to the project you want to build with Claude Code
# cd ~/projects/awesome-new-project

# Launch Claude Code safely inside claude-pod container in "auto-approval" mode
~/tools/claude-pod/claude-pod claude --dangerously-skip-permissions

Enter fullscreen mode Exit fullscreen mode

Docker is the only requirement. The install path (~/tools/claude-pod) is just an example — put it wherever you want.

The outcome: You can run Claude Code in auto-approval mode, skipping the need to approve every single change, without exposing your whole machine. claude-pod launches Claude inside a Docker container with only your current project folder mounted, so Claude can read and edit that project, but not your home directory, SSH keys, other projects, or host shell. This turns the main risk from “Claude can touch my machine” into “Claude can touch this project folder.” Read more about what is and isn't isolated.

Prefer the official approach? See Anthropic's Claude Code sandboxing documentation.

Requirements

Just Docker.

Claude Code runs inside the container, not on your host — you do not need Node.js, npm, or the claude CLI installed on your machine. The host stays untouched apart from one state folder (~/.claude-pod/) that exists only to keep your login across container restarts.

What it actually does

The whole tool is four tiny files:

  • Dockerfilenode:24-slim + git + curl + less + jq + gh + @anthropic-ai/claude-code.
  • claude-pod — one docker run command that mounts your current directory and nothing else.
  • install.sh — checks Docker and builds the image. Doesn't touch any system path; the tool stays self-contained in this folder.
  • uninstall.sh — removes the image and ~/.claude-pod/ (auth + session history) after confirmation. Lists what it doesn't touch so you can clean those up yourself.

Usage

Call the script using its full or relative path from any project:

cd ~/Projects/anything
~/tools/claude-pod/claude-pod

Enter fullscreen mode Exit fullscreen mode

You land in a bash shell at the same path your project lives at on the host (e.g. /Users/you/Projects/anything), with claude on PATH. Run it however you like:

claude --dangerously-skip-permissions

Enter fullscreen mode Exit fullscreen mode

Alternatively, you may skip the shell and go straight into Claude. Anything you pass to claude-pod is run inside the container instead of bash. So this drops you directly into Claude in one command, and exits the container when Claude exits:

~/tools/claude-pod/claude-pod claude --dangerously-skip-permissions

Enter fullscreen mode Exit fullscreen mode

To exit, type exit.

Aliases

For your convenience, you can add the following aliases to your shell configuration file (~/.zshrc, ~/.bashrc, etc.):

alias claude-pod=~/tools/claude-pod/claude-pod                                  
alias cc='~/tools/claude-pod/claude-pod claude --dangerously-skip-permissions'  

Enter fullscreen mode Exit fullscreen mode

The shell-first form is more flexible, since you can run npm install, dev server, tests, then claude directly inside the container, so it is the default.

First launch (login)

The first time you start Claude inside the pod, it will print a login URL. Open it in your host browser, complete the login, paste the verification code back into the container, and you're done. The session persists in ~/.claude-pod/ and survives container restarts — you only do this once per machine.

Exposing ports

By default, claude-pod doesn't publish any ports to the host (outbound traffic is still unrestricted — see What is and isn't isolated). Map ports through with the PORTS environment variable:

# Map a single port (127.0.0.1:3000 -> container:3000)
PORTS=3000 claude-pod

# Map multiple ports
PORTS="3000 5173" claude-pod

# Map a specific host port to a different container port
PORTS="8080:80" claude-pod

# Or, alternatively, without using aliases
PORTS="5173:5173" ~/tools/claude-pod

Enter fullscreen mode Exit fullscreen mode

Bind your dev server to 0.0.0.0 inside the container, not localhost. Most dev servers default to localhost, which means they only listen on the container's own loopback — your host browser can't reach them even with PORTS=... set. Common fixes:

  • Vite: npm run dev -- --host (or vite --host 0.0.0.0)
  • Next.js: next dev -H 0.0.0.0
  • Create React App / webpack-dev-server: HOST=0.0.0.0 npm start
  • Django: manage.py runserver 0.0.0.0:8000
  • Rails: rails s -b 0.0.0.0

The host-side mapping is still 127.0.0.1-only (forced by claude-pod), so binding 0.0.0.0 inside the container does not expose your dev server to your LAN.

Updating or pinning the Claude Code version

By default, install.sh fetches whatever's currently latest on npm, bypassing Docker's cache for that step. To update, just re-run:

cd ~/tools/claude-pod
./install.sh

Enter fullscreen mode Exit fullscreen mode

To pin a specific version, set CLAUDE_CODE_VERSION:

CLAUDE_CODE_VERSION=2.0.0 ./install.sh

Enter fullscreen mode Exit fullscreen mode

Pinned versions cache normally across rebuilds. The script prints the resolved version after each build, so you always know what you got.

Customizing the image

The image is intentionally minimal: node:24-slim + git + curl + less + jq + gh + Claude Code. Nothing language-specific. Anything your projects need (Python, build tools, other toolchains) you add yourself — edit the Dockerfile and re-run ./install.sh.

What is and isn't isolated

Safe from Claude:

  • Everything outside the project folder you launched from. ~/.ssh, ~/.aws, ~/.zshrc, browser data, other projects — all unreachable.
  • The host shell. No way to execute commands on your host machine.

Still exposed:

  • The project folder itself. Anything inside it — .env, .git/config (which can carry credentials for private remotes), private keys committed by mistake, node_modules, sibling worktrees, scratch files — is fully readable and writable by code running in the container. Don't run claude-pod from a folder whose contents you wouldn't trust the AI (or a malicious dependency it just installed) to see and modify.
  • The network. Outbound is unrestricted. A malicious payload could exfiltrate the project contents or burn your Anthropic API quota.
  • Your Anthropic login (stored in ~/.claude-pod/ on the host, separate from any host Claude install, shared across sandboxed projects).

Where Claude can actually write — two paths, both intentional bind mounts:

  • The project folder, bind-mounted at the same path inside the container ($PWD:$PWD). Edits land on your host's disk directly, no copy.
  • ~/.claude-pod/ on the host, mounted at /home/claude-pod/.claude. Holds the auth token and session history.

Because the current directory ($PWD) is mounted into the container, avoid running this tool from directories like root (/) or /etc or other sensitive ones. In such cases you are giving the AI access to your entire machine or to other sensitive data, defeating the purpose of the sandbox. Always cd into your specific project folder first.

Everywhere else Claude writes is either in the container's ephemeral filesystem (discarded on exit thanks to --rm) or simply has no path to land at — the Linux kernel's mount namespace makes any other host directory invisible to the container. Symlinks inside the project folder pointing to ~/.ssh or /etc/passwd appear broken for the same reason: those targets aren't mounted, so the container can't see them.

Hardlinks are different. A hardlink is a second name for an existing inode on the same filesystem. If a file inside your project folder is hardlinked to a sensitive file elsewhere on the same filesystem (e.g., ~/.ssh/id_rsa), the container can reach it through the hardlink — the bind-mount exposes the inode, not just the path. This requires the hardlink to already exist in the project folder, so it's a real concern only when you're inspecting code from an untrusted source. Treat unfamiliar projects with the same caution you'd apply to running their code directly: don't run claude-pod inside a folder you don't trust.

The tradeoff: the worst case becomes "something bad happens to one project folder," which is recoverable from git, instead of "my entire home directory is exposed."

Side effects outside the project folder

Everything this repo causes to exist outside the project you launch it from:

  • ~/.claude-pod/ on your host — auth token, settings, and per-project session/conversation history (transcripts can include code snippets and command output Claude saw). Auth and settings are shared across projects (one login, ever); session history lives under ~/.claude-pod/projects/<encoded-host-path>/, one folder per project, using the same encoding host-Claude uses — so if you ever switch to a host install, you can copy the folders over and keep your transcripts. This is not a host Claude install; it's a state directory for the container's Claude, kept on the host so it survives restarts.
  • Docker image claude-pod (~700 MB) and its layers, plus the node:24-slim base image, in Docker's image store.
  • Docker build cache from apt-get and npm install steps.
  • Outbound network during build: Docker Hub, Debian apt mirrors, npm registry. During runtime: api.anthropic.com and whatever your project code reaches (network is unrestricted).
  • While a session is running: one container process, and any ports you explicitly mapped via PORTS bound on 127.0.0.1.

No sudo, no writes to /usr/local/, /etc/, ~/.zshrc, ~/Library/, your existing ~/.claude/, or anywhere else on the host.

Uninstall

./uninstall.sh

Enter fullscreen mode Exit fullscreen mode

Removes ~/.claude-pod/ and the claude-pod image after confirmation. Tells you exactly what it isn't touching (node:24-slim, build cache, this repo) and how to clean those up yourself.

If you added a shell alias for convenience (e.g. alias claude-pod=... or alias cc=... in ~/.zshrc / ~/.bashrc), remove that line too — uninstall.sh doesn't touch your shell rc files.

Platforms

The wrapper is portable POSIX bash + Docker. It should work on any host with a recent Docker:

  • macOS (Apple Silicon and Intel) with Docker Desktop, OrbStack, or Colima — primary development target.
  • Linux with Docker Engine or Docker Desktop — bind mounts and --user UID/GID map directly here, the most native experience.
  • Windows + WSL2 with Docker Desktop's WSL2 backend — run claude-pod from inside a WSL distribution's bash shell.

Native Windows (cmd.exe / PowerShell) is not supported. The wrapper is a bash script and uses POSIX tools (id, etc.); use WSL2 instead.

If a platform doesn't behave as expected, please open an issue.