Launched March 3, 2026
tethered

tethered

Your app's network firewall — in one function call.

FreeOpen SourceSecurityAI Agents3,357 impressions#9 of its week1 comment

Comments

>log in to comment
  • Sergii Shcherbak[maker]· 8mo ago

    Hey community! I built tethered because Python has no built-in way to restrict outbound network access at runtime. One function call, zero dependencies — declare an allow list and any socket call outside it is blocked before a packet leaves the machine. Uses Python's audit hook system (PEP 578), no monkey-patching or proxies. Built it mainly for supply chain defense (compromised deps can't phone home), AI agent guardrails, and test isolation. Works with requests, httpx, aiohttp, Django, FastAPI — anything built on Python sockets. Fully open-source (MIT). Would love your feedback!

A zero-dependency Python library that restricts outbound network access at runtime. Declare an allow list, and every socket call outside it is blocked — supply chain defense, AI agent guardrails, and test isolation in a single line of code.

tethered is a zero-dependency Python library that enforces outbound network allow-lists at runtime.

for
Python developers who need runtime network egress control, including AI-generated code and third-party libraries.
pricing
open source
license
MIT
shcherbak-ai/tethered 10 0Pythonupdated 2 months ago
works withrequestshttpxaiohttpDjangoFlaskFastAPI

Key features

8 features of tethered
  • Process-wide activation — Call activate() once to set a global allow-list for all outbound sockets.
  • Scoped tightening — Use scope() to apply tighter restrictions to specific code paths or libraries.
  • Zero external dependencies — Implements checks by hooking Python's native socket layer, no extra packages needed.
  • Works with common frameworks — Compatible with requests, httpx, aiohttp, Django, Flask, FastAPI, and any socket-based library.
  • Subprocess propagation — Automatically propagates policies to child processes via site-packages bootstrap.
  • Locked-mode integrity checks — Detects tampering of policy payloads and filesystem changes.
  • DNS divergence repair — Falls back to safe DNS resolution when standard lookup fails.
  • Simple API — One-line allow-list declaration blocks unauthorized network calls with EgressBlocked exceptions.

Use cases

  • Prevent compromised dependencies from contacting external services during tests
  • Guard AI-generated code from unintentionally calling production APIs
  • Isolate background jobs to only permitted databases and services
  • Enforce staging-only network access in CI pipelines

tethered vs alternatives

tetheredaikidoFinePocketenvDaytona
Best forIn-process network firewall for PythonGeneral dev security toolingAI-assisted code generationIsolated execution environmentsRapid dev environment provisioning
PricingOpen sourceFreeFreeFreeFree
DevHunt upvotes1657573339
LaunchedMar 2026Dec 2024Jan 2023Apr 2026May 2024
  • tethered vs aikido: Focuses on broader security hardening for developers, not specifically runtime network egress control.
  • tethered vs Fine: Provides AI agents for software building, whereas tethered guards network calls made by such agents.
  • tethered vs Pocketenv: Offers a sandbox runtime for agents and humans, but does not enforce per-process network allow-lists.
  • tethered vs Daytona: Sets up development environments, not runtime network restrictions.

tethered FAQ

How does tethered block unauthorized network calls?+

It hooks into Python's socket layer and checks each outbound connection against the configured allow-list, raising an EgressBlocked exception if the target is not permitted.

Do I need a proxy or sidecar to use tethered?+

No, tethered runs entirely in-process and requires no external infrastructure or admin privileges.

Can I apply different policies to different parts of my code?+

Yes, the scope() function lets you define tighter allow-lists for specific modules, request handlers, or background jobs.

Is tethered compatible with asynchronous code?+

Yes, it works with async libraries such as httpx and aiohttp that rely on Python sockets.

What happens to subprocesses spawned by my application?+

tethered can auto-propagate the policy to child processes via a site-packages bootstrap, ensuring consistent enforcement.

Summarized by DevHunt from github.com · Sep 29, 2026. Details may change; check the official site.