glovebox-driver
The host-side Python that drives one glovebox microVM: boot it, run commands in it, read what it let out, and tear it down. It imports no eval framework, so an integration picks the framework and this package holds the VM.
inspect-glovebox and shepherd-glovebox are both built on it.
What the host needs
The driver runs the glovebox command, which drives Docker's sbx sandbox runtime. Install glovebox and sign in to sbx, then ask whether this host qualifies:
glovebox sandbox preflight
Set GLOVEBOX_BIN when the executable is not on PATH.
The modules
| Module | Owns |
|---|---|
cli |
resolving the glovebox executable and running one sandbox verb |
config |
GloveboxSandboxConfig — what a VM may be and which hosts it may reach |
session |
GloveboxSession — one live microVM, from boot to teardown |
wedge |
booting again when the HOST, not the work, wedged the first attempt |
guest_exec |
the argv for one command inside the guest, as the de-privileged user |
evidence |
reading the policy decision log the sandbox wrote |
leak |
reaping a microVM whose owner died before teardown |
Boot one
import os
from pathlib import Path
from glovebox_driver import cli
from glovebox_driver.session import GloveboxSession
workspace = Path("/path/to/workspace")
workspace.mkdir(parents=True, exist_ok=True)
os.chmod(workspace, 0o755)
ready_path = workspace / ".ready"
ready_path.touch()
cli.preflight()
session = GloveboxSession.boot(str(workspace), str(ready_path), boot_timeout=300)
try:
...
finally:
session.teardown()
boot waits for ready_path to exist; it never creates it. Every in-tree caller
touches its own marker first, and the guest user needs permission to traverse the
workspace, so a freshly created directory needs its mode set too.
Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glovebox_driver-0.1.0.tar.gz.
File metadata
- Download URL: glovebox_driver-0.1.0.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ad45d101db2ec06cdbc6df95ff95a9ed68590b105af43bf6cab6e6db07e9ed4
|
|
| MD5 |
ed17d232aced3c49309a1db2c3fd5ace
|
|
| BLAKE2b-256 |
675af07ffe13df2d75e5c4ffa0d1932aff1b931800d0f23c1d34339a058c2446
|
File details
Details for the file glovebox_driver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glovebox_driver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98076d676279c819946f0282fcbfafeed60609da99e1e29eaa1966c3b97ad92e
|
|
| MD5 |
b33e7f4cd82f2361adc0b5c1d4a8009d
|
|
| BLAKE2b-256 |
69b9e0c786dbba6fc8d49e4003bb099a7c978d44f6144b5588fb2efaeca3f4c7
|