Waitlist open Our new book, AI Engineering For Production, is coming before the end of 2026. Get the release date first.New book: AI Engineering For Production, coming before the end of 2026. Join the waitlist
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

I Ran One Fake Hostile Agent Through Five Sandboxes on My Mac
Latest   Machine Learning

I Ran One Fake Hostile Agent Through Five Sandboxes on My Mac

Last Updated on November 2, 2026 by Editorial Team

Author(s): Hubert Nakielski

Originally published on Towards AI.

Seatbelt, a hardened container, Docker Sandboxes, gVisor and Firecracker against the same canary: how to set each one up, what it stopped, and why only the credentials hole stayed open in all five.

In a February 2026 red-team exercise at Anthropic, a phished employee launched Claude Code with a prompt that read ~/.aws/credentials and posted them out, and Claude completed the exfiltration 24 times out of 25. Anthropic's write-up says only the environment holds against that: egress controls that block the POST, and filesystem boundaries that keep ~/.aws out of reach. So I ran a fake version of that agent bare, then through five boxes on my M3 Mac. Each setup is below. My verdict up front: on a laptop, what you let through matters more than which box you pick.

I Ran One Fake Hostile Agent Through Five Sandboxes on My Mac

Source: Image by the author.

The article compares five isolation approaches—bare execution, a macOS process sandbox (srt/Seatbelt), hardened Docker containers, Docker Sandboxes (microVMs on Apple Hypervisor.framework), and (optionally) gVisor and Firecracker inside a nested Lima VM—by running the same “canary” payload that attempts to read fake AWS-like credentials, write a malicious git hook, delete files outside the workdir, and exfiltrate a token over allowed and disallowed network endpoints. Across most configurations, filesystem and egress controls stop the intended file and network probes when the relevant paths and destinations aren’t mounted or allowlisted, but the token exfiltration and host git-hook landing often succeed because the sandbox still receives the token via the environment and mounts the project (or otherwise gives a writable path), and Claude Code’s proxy decides hostnames without inspecting TLS. The author concludes that “close the holes first” (avoid credential exposure, restrict mounts, and treat every allowlisted host as an egress path) matters more than which sandbox technology is chosen, and notes practical limitations (sandbox defaults, incomplete coverage like git hooks/MCP/local servers, and mismatches between vendor specs and real performance due to snapshots and nesting costs).

Read the full blog for free on Medium.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Towards AI Academy

We Build Enterprise-Grade AI. We'll Teach You to Master It Too.

15 engineers. 100,000+ students. Towards AI Academy teaches what actually survives production.

Start free — no commitment:

→ AI Engineering For Production — our new book, coming before the end of 2026. Join the waitlist.

→ Agents Architecture Cheatsheet — 3 years of architecture decisions in 6 pages

Our courses:

→ AI Engineering Certification — 90+ lessons from project selection to deployed product. The most comprehensive practical LLM course out there.

→ Agent Engineering Course — Hands on with production agent architectures, memory, routing, and eval frameworks — built from real enterprise engagements.

→ AI for Work — Understand, evaluate, and apply AI for complex work tasks.

Note: Article content contains the views of the contributing authors and not Towards AI.