Hardened Podman container runner with gate server and shield integration
Project description
terok-sandbox
The hardened-Podman runtime — terok-sandbox launches per-task containers with a credential vault, a gated git server.
What it provides
- Hardened container lifecycle — rootless Podman containers.
- Credential vault — long-lived secrets stay in an encrypted database on the host. The container receives short-lived phantom tokens and do not see the real credentials
- Per-task git gate — a token-authenticated HTTP mirror of an arbitrary upstream git repository. Tasks clone and push through the gate, and the operator forwards to upstream after review.
- Shield firewall — installs the terok-shield OCI hooks at setup time and drives the firewall at runtime.
- Clearance install — wires the desktop notifier daemon terok-clearance onto blocked outbound connections, so the operator can authorise destinations live.
- Setup as one call — idempotent
sandbox_setup()installs the OCI hooks;sandbox_uninstall()uninstalls.
Where it sits in the stack
terok-sandbox is the boundary layer. Above it, single-task callers (terok-executor) and multi-task orchestrators (terok) treat the sandbox as a black-box "give me a hardened container." Below it, it composes terok-shield for egress filtering and terok-clearance for the operator-in-the-loop verdict path.
Public API
from terok_sandbox import (
# Lifecycle
Sandbox, SandboxConfig, RunSpec, VolumeSpec, Sharing,
# Runtime backends
PodmanRuntime, NullRuntime, ContainerRuntime,
# Vault
VaultManager, CredentialDB, SSHManager,
start_vault, stop_vault, ensure_vault_reachable,
# Gate
GateServerManager, TokenStore, GitGate,
start_daemon, stop_daemon, create_token,
# Shield adapter
ShieldState, make_shield,
# Setup / teardown
sandbox_setup, sandbox_uninstall, needs_setup,
)
The full export list lives in
src/terok_sandbox/__init__.py.
CLI
| Command | Purpose |
|---|---|
terok-sandbox setup |
Install hooks, vault, gate, notifier; idempotent |
terok-sandbox uninstall |
Reverse of setup |
terok-sandbox doctor |
Run health checks against installed services |
terok-sandbox vault … |
Vault management subcommands |
terok-sandbox gate … |
Gate management subcommands |
terok-sandbox shield … |
Shield install / status / direct control |
terok-sandbox ssh … |
Per-container SSH key provisioning |
Requirements
- Linux with Podman (rootless, ≥ 5.6 recommended)
- systemd user session (for gate / vault / clearance services)
- nftables (
nftbinary) — provided by terok-shield's runtime - D-Bus session bus — for the clearance notifier path; the system degrades gracefully when D-Bus is absent
- Python 3.12+
Installation
pip install terok-sandbox
For most users this dependency is pulled in transitively by
terok-executor or terok. Install it directly only when building
a custom orchestrator on top of the sandbox API.
License
Apache-2.0 — see LICENSES/Apache-2.0.txt.
Project details
Release history Release notifications | RSS feed
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 terok_sandbox-0.2.0.tar.gz.
File metadata
- Download URL: terok_sandbox-0.2.0.tar.gz
- Upload date:
- Size: 247.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3be21a77976515d5123ebeb3795700403c6214a9f402ee8c17d02dfcc1755fae
|
|
| MD5 |
a5e44a73053a56d019cb90a065f65e81
|
|
| BLAKE2b-256 |
8ec9571be5f33e91d06a30787f1fba45611d849911d9494ef58c43f2bcfc3368
|
Provenance
The following attestation bundles were made for terok_sandbox-0.2.0.tar.gz:
Publisher:
release.yml on terok-ai/terok-sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terok_sandbox-0.2.0.tar.gz -
Subject digest:
3be21a77976515d5123ebeb3795700403c6214a9f402ee8c17d02dfcc1755fae - Sigstore transparency entry: 1766328684
- Sigstore integration time:
-
Permalink:
terok-ai/terok-sandbox@288bd6212862cd382bb13cf9db0cbd89778ccf22 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/terok-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@288bd6212862cd382bb13cf9db0cbd89778ccf22 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file terok_sandbox-0.2.0-py3-none-any.whl.
File metadata
- Download URL: terok_sandbox-0.2.0-py3-none-any.whl
- Upload date:
- Size: 298.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2a01b7eab09f115fbacc25392120f04e903494fa1ea520ed69f0c7c24621435
|
|
| MD5 |
f35b543859394d811e1de5052e3acac9
|
|
| BLAKE2b-256 |
e0f7800945fa3f2616c4cfb3991a1cd2974f3fd78a143fb76eb401eaf96cb102
|
Provenance
The following attestation bundles were made for terok_sandbox-0.2.0-py3-none-any.whl:
Publisher:
release.yml on terok-ai/terok-sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terok_sandbox-0.2.0-py3-none-any.whl -
Subject digest:
c2a01b7eab09f115fbacc25392120f04e903494fa1ea520ed69f0c7c24621435 - Sigstore transparency entry: 1766329446
- Sigstore integration time:
-
Permalink:
terok-ai/terok-sandbox@288bd6212862cd382bb13cf9db0cbd89778ccf22 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/terok-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@288bd6212862cd382bb13cf9db0cbd89778ccf22 -
Trigger Event:
workflow_dispatch
-
Statement type: