Details
ai / prototype
Secure Env Manager
Secure Env Manager creates Distrobox-based development homes backed by LUKS storage, masked host-home access, reduced capabilities, isolated credentials, browser/editor separation, controlled audio/video/X11 bridges, and encrypted export/import across machines.
Problem
AI coding tools read project files, execute scripts, reuse browser sessions, and inherit credentials from the environment they run in. When work, personal, and academic projects share a host home, the risk is accidental context and credential crossover.
Contribution
Built the scripts and environment model for isolated Distrobox developer homes over LUKS-backed sparse images, with masked host-home access, generated per-environment SSH keys, separate browser/editor state, minimal capabilities, private IPC/PID namespaces, desktop integration, and verification commands.
Isolation Boundary
Each environment has its own encrypted storage mounted under an isolated container home. The host home is replaced by an empty mask, the container user has a separate UID/home, the Docker group is absent, Chromium sandboxing remains enabled, and capabilities are reduced instead of running privileged. The protection is strongest for at-rest storage and accidental host-home access; allowed desktop bridges remain explicit boundaries rather than erased risk.
Technical decisions
Desktop Bridges
The project keeps a usable development desktop without pretending those bridges are free.
Encrypted Portability
Export creates an encrypted portable bundle containing OCI rootfs, developer home, container metadata and checksums, protected by password or GPG recipient. Send transfers it over SSH. Import preserves container-relative ownership across different Podman subordinate UID/GID ranges and refuses to overwrite an existing container or home. Migration snapshots an existing rootless Distrobox without deleting the origin.
Tradeoffs
Outcome
A concrete AI-security tooling project: each agent context gets its own encrypted storage, browser profile, editor state, SSH identity, and filesystem boundary.
Stack and domains
- Linux
- Distrobox
- Podman
- LUKS
- cryptsetup
- Bash
- ACL
- socat
- PulseAudio/PipeWire
- X11
- udev
- GPG