Skip to main content

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 exploitbench-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.

Metadata

Release files for glovebox-driver 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glovebox-driver 0.3.0
File Size Uploaded
glovebox_driver-0.3.0.tar.gz 56.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glovebox-driver 0.3.0
File Interpreter ABI Platform
glovebox_driver-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 117.2 kB

Release files / glovebox_driver-0.3.0.tar.gz

Download URL glovebox_driver-0.3.0.tar.gz
Size 56.1 kB
Tags Source
SHA-256 checksum
How to use checksums
93aad7fa779cf02a3d787288a1aba7bc2db732792670f46ca92c2f0fcd488118
BLAKE2b-256 checksum
How to use checksums
e7a4c463a96a33c367f4048206ec7dbbc448d96399ac4f19fad2db10bcd3b85d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release files / glovebox_driver-0.3.0-py3-none-any.whl

Download URL glovebox_driver-0.3.0-py3-none-any.whl
Size 61.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d255c9ecf9dce21e946e123c71fabffcd9fe6c089654c3ba0d714960cc9328c6
BLAKE2b-256 checksum
How to use checksums
ad1b87fa1e5e4cd0297c8193d2ef3b69c475ef104220991210b5cfa4307e1644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page