DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

How to Sandbox Claude Code with BitLocker+VMs for Secure Enterprise Use

Sandbox Claude Code using BitLocker-encrypted VMs and an airlock drive to prevent it from accessing sensitive work files—setup takes ~5 minutes per developer.

The Problem: Claude Code's Power Is Its Risk

Making Claude Code more secure and autonomous with sandboxing \ Anthropic

Claude Code has direct file system and shell access. That's what makes it so effective for coding—it can read, write, and execute commands in your project. But if you're working with client data, sensitive codebases, or regulated environments, that access is a liability.

One developer on r/ClaudeAI shared their "slightly paranoid" setup that's actually the right level of caution for enterprise use. Here's exactly how they did it.

The Technique: BitLocker + VM + Airlock Drive

The core insight: give Claude Code everything it needs (internet, dev tools, Claude access) while giving it nothing it shouldn't have (your network, your files, your secrets).

Step 1: Encrypted SSD + Virtual Machine

Start with a BitLocker-encrypted SSD. On it, run a VM (Hyper-V, VMware, or VirtualBox—pick your poison). The VM has internet access but no connection to your work network. No mapped drives, no VPN, no network shares.

# In Hyper-V Manager, create a VM with:
- No virtual switch to work network
- External switch for internet only
- BitLocker encrypted VHDX on encrypted SSD
Enter fullscreen mode Exit fullscreen mode

Step 2: Pre-Baked Dev Environment

Create a base VM image with all your development tools pre-installed. When a new developer joins, they mount the image, log into their Claude account, and they're coding in ~5 minutes. No setup friction.

Step 3: The Airlock Drive

This is the clever part. Create an additional virtual drive that can be mounted to either your host PC or the VM—but never both simultaneously. Transfer files through this airlock:

  1. Mount the airlock drive on your PC
  2. Copy files in
  3. Unmount from PC
  4. Mount on VM
  5. Claude Code sees only what's on the airlock

Why This Works

Claude Code operates within the VM's sandbox. It can't:

  • Scan your host file system
  • Access network shares
  • Exfiltrate data to work resources
  • Persist beyond the VM's lifecycle

But it still has:

  • Full internet access for API calls
  • All your dev tools
  • The files you explicitly give it via the airlock

The Trade-Offs You Need To Know

How to Use New Claude Code Sandbox to Autonomously Code (Without ...

This isn't free. You're sacrificing:

  • Convenience: File transfer requires explicit steps
  • Performance: VM overhead on compute-heavy Claude Code operations
  • Clipboard: No seamless copy-paste between host and VM (by design)

But for regulated environments—finance, healthcare, government—this is table stakes. And the 5-minute setup time per developer means you're not sacrificing velocity.

Is This Too Paranoid?

The original poster asked exactly that. Based on the entity relationships in our knowledge graph, Claude Code has direct file system and shell access—meaning it can theoretically read any file its process can. For teams using Claude Code with Claude Opus 4.6 (1M-token context window), the risk isn't just accidental exposure—it's that the model could incorporate sensitive data into its reasoning.

If you're already using CLAUDE.md for project instructions, this VM setup complements it: CLAUDE.md tells Claude Code what to do, the VM tells it what it can see.

Try It Now

  1. Create the base VM: Install your dev tools, Claude Code, and Claude CLI
  2. Encrypt everything: BitLocker on both host and VM drives
  3. Build the airlock: A VHDX file you mount/dismount as needed
  4. Document the workflow: "Mount airlock, copy files, dismount, mount on VM"

For teams already using Cursor or Copilot with similar concerns, this same pattern applies—though Claude Code's shell access makes it uniquely important to sandbox.

The Bottom Line

Claude Code is powerful. That power includes the ability to read anything on your system. For enterprise work, a VM sandbox with an airlock drive isn't paranoia—it's engineering discipline.


Source: reddit.com

[Updated 09 Jun via gn_claude_community]

Anthropic co-founder Jack Clark and Marina Favaro of the Anthropic Institute published a research paper on June 4, 2026, revealing that 80% of code merged into Anthropic's production systems is now written by Claude—up from low single digits at launch in February 2025 [per Crypto Briefing]. The paper also disclosed an 8x engineering productivity multiplier by Q2 2026, a 1,000x reduction in API errors from 800 fixes completed in weeks, and task success rates on complex engineering problems climbing from 26% (Nov 2025) to 76% (May 2026).


Originally published on gentic.news

Top comments (0)