Show HN: Drop – A rootless Linux sandbox with gVisor support
Introducing Drop: A Rootless Linux Sandbox with gVisor Support
Drop is a streamlined Linux sandboxing tool designed to provide robust isolation without disrupting your existing workflow. It allows users to sequester applications and autonomous coding agents while remaining within their native development environment.
"Linux sandboxing that doesn't get in your way."
🎯 Primary Use Cases
Drop is specifically engineered to mitigate risks associated with executing untrusted code:
- Autonomous Coding Agents: You can run agents using the
--dangerously-skip-permissionsflag, shifting the responsibility of permission enforcement from the agent to the OS level via Drop. - Third-Party Software: When installing packages from sources like
npmorPyPI, Drop ensures these programs cannot access your entire user account.Risk: Supply chain attack compromises your home folder.- Solution: Damage is strictly contained within the sandbox.
⚙️ How It Works
Drop creates disposable, isolated environments that mirror the simplicity of Python's virtualenv, but for your entire system.
Core Architecture
The isolation is achieved through a combination of Linux namespaces. The relationship can be represented as:
The Technical Stack:
- Namespaces: It utilizes
process,mount,network,IPC, andcgroupnamespaces. - Privilege Reduction: To ensure security, Drop drops all user namespace capabilities before the program starts, preventing actions like
bind mountsinside the sandbox. - Home Directory: Each environment receives its own home directory, while your actual
$HOMEis hidden.
Comparison: Drop vs. Traditional Containers
| Feature | Docker / Podman | Drop |
|---|---|---|
| Setup | Requires image/container config | Uses your current distribution |
| Availability | Only what's in the image | All installed system programs |
| Overhead | High (Image management) | Low (Disposable environments) |
| Isolation | Container-based | Rootless User Namespace |
🛠 Configuration & Integration
Drop uses a high-level TOML configuration language to define the sandbox boundaries.
# Example Drop Configuration
[permissions]
exposed_dirs = ["/home/user/projects/app"]
exposed_files = ["/etc/hosts"]
network_services = ["localhost:8080"]
Key Config Details:
- Base Config: Most environments share a global base configuration, allowing you to spin up new sandboxes without repetitive setup.
- Flexibility: You can precisely control which local network services, directories, and files are visible to the sandboxed process.
The gVisor Advantage
For those requiring extreme security, Drop integrates with gVisor. This provides a user-space kernel that acts as an intermediary.
By preventing direct access to the host kernel, gVisor drastically lowers the risk of kernel-level vulnerability exploits.
🚀 Getting Started
To begin using Drop, follow these steps:
- Install the Drop binary.
- Define your base
TOMLconfiguration. - Create your first disposable environment.
- Execute a third-party tool or agent.
For more details, refer to the Documentation or the Sandbox overview in the official guide.