Repository navigation
Releases
whim v0.5.0 — no-public-egress runtime isolation
Security
- Fixes
--egress nonesilently inheriting AWS public runtime egress. Whim now launches with exactly one validated customer-managed isolated connector and fails closed on missing, unsafe, drifted, or mismatched topology. - Separates image-build networking from runtime policy: public egress remains available while pulling/building the image, while launched MicroVMs use the isolated connector.
- Verifies the launched MicroVM reports the expected connector and terminates it if runtime metadata cannot be verified.
Added
--egress-auto-provisionsupport for a dedicated local-route-only VPC topology with zero security-group outbound rules.- Public library APIs for provisioning and validating no-public-egress connectors.
- Live AWS regression coverage for direct-IP and HTTPS connection blocking.
Scope
This release guarantees no public egress, not strict DNS isolation. DNS may still resolve through the AWS-provided resolver; strict DNS is tracked in #7.
Install
go install github.com/udgover/whim/cmd/whim@v0.5.0Fixes #6 after released-version verification.
whim v0.4.0 — persistent MicroVM boxes (run -d, exec -it, rm)
whim shells are disposable by default — the VM terminates when you disconnect or the command finishes. This release adds an opt-in way to keep one around: persistent boxes.
whim run -d --idle 15m --suspend-after 2h # prints the id, returns immediately
whim exec -it microvm-abc123 # attach an interactive shell
# ...work, then Ctrl-] to detach — the box keeps running...
whim exec -it microvm-abc123 # reconnect later: fresh shell, disk intact
whim rm microvm-abc123 # done — terminate itWhat's new
- whim run -d launches a persistent box instead of a throwaway one: it prints the bare id and returns without attaching or terminating. --idle / --suspend-after / --auto-resume configure its idle policy.
- whim exec -it attaches an interactive shell to a running or suspended box — Ctrl-] detaches without terminating it. Unlike docker exec -it, it takes no trailing command: the shell endpoint always starts a fresh shell, with no wire mechanism to select a program over that connection. Run your command once you're attached instead.
- whim rm <id…> terminates by id — like suspend/resume/exec, no ownership check (contrast the owned-bulk gc). Idempotent on an already-gone id; a failure on one id in a list doesn't stop the rest.
- exec/put/get/exec -it all resume a suspended box transparently on first use, via a single change to Manager.Attach — no per-command resume logic needed (put/get needed no code changes at all).
The idle policy's real behavior — read this before relying on it for cost control
Both directions were verified against real AWS, and one is the opposite of what you'd guess:
- A detached box (no attached shell) with a background job running does suspend after --idle with no traffic, and the job actually freezes, not just billing. It resumes — and the job continues — the next time anything touches it.
- A box with an attached shell, even sitting idle at the prompt sending nothing, does NOT suspend. Merely holding the connection open counts as traffic. So whim exec -it left attached while you walk away keeps the box running and billed until --ttl, detach, or rm — --idle only protects you once you actually detach (Ctrl-]).
- A session's lifetime is governed by the VM's own --ttl (hard cap, ≤8h) and its idle policy — not by any client-side token-refresh mechanism. There isn't one: an established shell connection is unaffected by its underlying auth token expiring in the background (confirmed live, including a permanent opt-in canary test that re-checks this platform behavior).
What persists across a detach/reconnect, and what doesn't
- ✅ Files on disk, and any background process still running.
- ❌ Your terminal state — the open editor, shell history-in-progress, current directory. Reconnecting always gives you a fresh shell. Run tmux inside the box if you want the session itself, not just the disk, to survive.
Validated live
Full round trip: launch a persistent box → attach and write a marker file → detach (Ctrl-]) → reconnect (fresh shell, different pid, marker still there) → suspend → exec auto-resumes and reads the marker back → rm. Plus a permanent, opt-in integration suite (WHIM_INTEGRATION=1) covering concurrent multi-attach independence, idle-suspend with a real frozen background job, the open-shell-prevents-suspend finding, and resume-on-use.
Compatibility
Purely additive and opt-in — whim shell/whim run are unchanged, and every existing command keeps working exactly as before.
Install
go install github.com/udgover/whim/cmd/whim@v0.4.0
whim v0.3.0 — opt-in privileged shells via AWS additionalOsCapabilities
A whim shell is root, but under a restricted Linux capability set — so mount, network namespaces, unshare, and eBPF are all denied (EPERM) even as uid 0. This release adds an opt-in way to lift that: AWS Lambda MicroVM "operating system capabilities."
whim --privileged # throwaway shell that can mount, netns, run eBPF
whim run --privileged -- mount -t tmpfs none /mnt # one-shot privileged command
whim build ./app --name whim-app --privileged # bake ALL capabilities into a custom imageWhat's new
- --privileged grants the image AWS's additionalOsCapabilities: ["ALL"] (the only value AWS supports today), lifting the effective capability set to everything — mount, network namespaces, unshare, eBPF, nested containers.
- whim --privileged / whim run --privileged launch the well-known whim-privileged image, auto-built on first use (~2-3 min, like
whim init) and cached alongside your other images. It ships the tooling to use the caps — util-linux, iproute, e2fsprogs — since capabilities unlock syscalls, not binaries. Mutually exclusive with --image. - whim build --privileged bakes ALL capabilities into a custom image instead, fixed at build time and inherited by every VM launched from it.
- Capability-aware image reuse. A privileged build never silently reuses an unprivileged image or vice versa — reuseImage compares an existing image version's capabilities (via a new GetMicrovmImageVersion call) against the request and refuses a mismatch (ErrCapabilityMismatch). whim --privileged likewise verifies a cached ARN is actually privileged before reusing it.
Hardening in this release
- Image specs are fully validated (required fields, capabilities, egress) before any destructive AWS action — an invalid spec never costs you your existing image on a forced rebuild's delete step.
- Privileged auto-build is bounded by a timeout and streams progress to stderr, so whim run's stdout stays limited to remote output.
- whim image rm now prunes the deleted image's cached config entry.
Validated live
An ["ALL"] image reaches CREATED/ACTIVE; a privileged shell performs mount/netns/unshare while an identical unprivileged shell is correctly denied; and a non-privileged build over an already-privileged image is refused.
Isolation note
Elevated capabilities are opt-in — default images stay minimal-capability and privilege is never granted implicitly — and apply within the VM's isolation boundary: per AWS, they do not affect the host or other MicroVMs.
Compatibility
Purely additive — every existing command and default image behavior is unchanged.
Install
go install github.com/udgover/whim/cmd/whim@v0.3.0
whim v0.2.0 — build custom MicroVM images from source
whim init builds the default sandbox image; this release adds whim build to build custom images from your own source — no git, no Docker, and no new third-party dependencies.
whim build ./app --name whim-app # local dir (Dockerfile at its root)
whim build ./Dockerfile --name whim-min --egress none # single local Dockerfile, airgapped
whim build s3://my-bucket/app.zip --name whim-s3 --json
whim build https://example.com/app.zip --name whim-https
GITHUB_TOKEN=… whim build github.com/org/repo@<full-sha> --name whim-repo --forceWhat's new
- microvm.BuildFromSource — orchestrates classify → reuse-or-force → stage → EnsureImage, reusing the existing image lifecycle. New sentinels ErrInvalidSource and ErrSourceTooLarge.
- Four source kinds: a local directory or Dockerfile, an s3://bucket/key object, an https:// archive/raw Dockerfile, and GitHub shorthand (github.com/org/repo@ref, CLI-only — lowers to an HTTPS archive download).
- --name is the cache key. A second whim build --name X reuses image X unless you pass --force (delete + rebuild). A changed source does not trigger a rebuild on its own.
- --egress public|none fixes the image's outbound policy at build time, inherited by every VM launched from it (none is airgapped).
- --context-subdir
descends into a subdirectory before locating the Dockerfile (also strips a wrapping top-level dir from forge archives).
- --json prints one redacted result object and suppresses progress output.
- GitHub auth via GITHUB_TOKEN — sent only as a request header, never in a URL, never logged or written to config. Use a full commit SHA for an immutable source identity (branches/tags are moving targets).
Safety & limits
Every source — local, S3, and HTTPS alike — is validated and normalized before any build: archives are re-rooted, and absolute/../duplicate paths and root-escaping symlinks (including via --context-subdir) are rejected. Caps: 256 MiB compressed, 1 GiB uncompressed, 10,000 files. A .dockerignore at the context root is honored for a documented subset (blank lines, #
comments, ! negation, leading-/ anchoring, trailing-/ dir matches, */? single-segment globs); unsupported constructs (**, […]) are rejected rather than silently mis-applied.
Compatibility
Purely additive — every v0.1.0 command and library call is unchanged. Custom image names are cached alongside the default image in ~/.config/whim/config.json, in a format that survives whim init and cache clears.
Not in this release
Private-ECR base images — the build role's IAM is intentionally not widened until that path is validated. whim build builds on the same managed base image as whim init.
Install
go install github.com/udgover/whim/cmd/whim@v0.2.0
whim v0.1.0 — first release
Ephemeral AWS Lambda MicroVM shells — a Go library (microvm) and CLI (whim).
Spin up a throwaway root shell in a Firecracker MicroVM in ~2 seconds, run something, and let it disappear.
whim init # one-time: build the default sandbox image (~3 min)
whim # drop into a throwaway root shell
whim run -- pytest # spawn → run → stream output → propagate exit code → terminateWhat's in v0.1
Build once, run many. whim init provisions an S3 build bucket + IAM build role, then builds a default AL2023 image and caches its ARN. Every subsequent whim/whim run launches a fresh VM from that image in ~2s over an authenticated WebSocket, and terminates it on exit. Every VM carries a server-side TTL (default 25m, max 8h) as a cleanup backstop.
CLI:
- whim / whim shell — interactive root shell (Ctrl-] to disconnect)
- whim run -- <cmd…> — launch, run, stream output, propagate exit code, terminate
- whim exec -- <cmd…> — run a command in an existing VM
- whim put/whim get — copy files/dirs in or out (binary-safe, docker cp-style)
- whim ps / whim gc — list / bulk-terminate your whim VMs (docker ps-style)
- whim suspend/whim resume — pause/restart a VM with disk + memory intact
- whim image ls/whim image rm — manage built images
- whim init / whim preflight-check / whim version — bootstrap, checks, version
Library. microvm is the product; the CLI is a thin client. It's credential-injection-only (you pass an aws.Config — composes with IRSA, ECS task roles, aws-vault, assumed roles) and exposes Launch, Shell, Exec, Put/Get, Suspend/Resume, List/GC, all through typed sentinel errors.
Security model: shell tokens are never logged, credentials are injection-only, every VM always carries a TTL, and ps/gc are scoped to your own account's images (VMs can't be tagged, so ownership is ARN-derived). The id-targeted commands (exec, put, get, suspend, resume) act on any VM you explicitly name — like ssh , naming the target is the authorization.
Known v0.1 limitations
- Ownership is image-derived, not tagged — scope gc carefully if you run another tool against the same account's images.
- Exec output is combined stdout+stderr (a pty merges them).
- Interactive shells last ~30 min (the shell-token lifetime); no reconnect.
- Transfers are in-memory, capped at 256 MiB per put/get.
- Reconnect yields a new shell (disk persists, in-memory state does not).
- Terminal resize isn't forwarded yet.
Install
go install github.com/udgover/whim/cmd/whim@v0.1.0
aws login
whim preflight-check
whim initApache 2.0.
Full Changelog: https://github.com/udgover/whim/commits/v0.1.0