🛡️ AI DevSec Gateway (formerly AI Network Blocker)
Local controls for blocking, auditing, and routing AI developer traffic.
📖 What is this?
AI DevSec Gateway is an open-source privacy and DevSecOps tool for developers adopting AI coding assistants. It provides local controls to block known AI endpoints, route API traffic to local inference servers, and audit active AI editor processes.
Originally created as a simple GUI to block AI endpoints, it is evolving into a Zero-Trust Gateway for safer AI-assisted development. The current release focuses on deterministic hosts-file blocking, a local HTTP router, safe-by-default CLI controls, and a security auditor that keeps API keys in memory only.
- Block: A deterministic OS-level override via the
hostsfile that drops connections to 38+ known AI domains. - Route: A local HTTP proxy that can route compatible API clients to local LLMs such as Ollama, LM Studio, or vLLM.
- Audit: Process-aware security checks that help identify active AI tools and data-leak risk signals.
✨ Features
| Feature | Description |
|---|---|
| 📊 Live Token Dashboard | Real-time token in/out and request counts with auto-refresh every 5s while the gateway runs. Fetch stats via /stats HTTP endpoint. |
| 🔀 Transparent API Router | Seamlessly reroute Copilot/Cursor HTTP traffic to your own Local LLM inference servers. |
| 🛡️ AI DevSec Auditor | Live process analysis with on-demand OpenAI recommendations. API keys are memory-only and never persisted. |
| 🔄 DLP & Guardrails Toggle | Enable or disable Deep Packet Inspection and semantic guardrails per-session via gateway config flags. |
| 💻 Native CLI Interface | Full headless control for CI/CD environments. Use ai-blocker --status or ai-devsec-gateway --block. |
| 🔒 Deterministic Kill Switch | Hard OS-level blocking through managed hosts entries. No reliance on remote DNS filtering servers. |
| 📦 Universal Distribution | Install via pip, brew, scoop, or as a portable single-file binary for Windows/Linux/macOS. |
| 🌍 Multilingual GUI | A premium Catppuccin Mocha interface with 10 supported languages and smart OS elevation (UAC/sudo). |
🏢 Enterprise Use Cases
Why do DevSecOps teams and CISOs deploy AI DevSec Gateway?
- Prevent Data Exfiltration (PII/Secrets): Your team uses Cursor or Copilot, but compliance regulations (GDPR/HIPAA) strictly forbid sensitive environment variables (
.env) or proprietary algorithms from leaving the local network. - Air-Gapped LLM Routing: You want to transparently force all Copilot traffic within the corporate network to route to an internal, self-hosted Llama-3 (Ollama) server, without requiring developers to change their IDE settings.
- Shadow AI Auditing: Passively discover which unapproved AI tools or autonomous agents are running in the background on developer workstations.
Read our full Enterprise Use Cases guide for deployment patterns.
🎯 Supported Providers
The default interception engine targets 38+ domains across major providers:
| Provider | Key domains intercepted |
|---|---|
| 🟢 OpenAI | api.openai.com, chatgpt.com, platform.openai.com |
| 🟠 Anthropic | claude.ai, api.anthropic.com, anthropic.com |
| 🐙 GitHub Copilot | copilot.github.com, api.githubcopilot.com, telemetry.githubcopilot.com |
| 🔵 Google AI | gemini.google.com, aistudio.google.com |
| 🟦 Microsoft | copilot.microsoft.com, bing.com |
| 🔷 Meta AI | meta.ai, ai.meta.com |
| 🌊 Mistral / DeepSeek / xAI | mistral.ai, api.deepseek.com, api.x.ai |
The blocklist is dynamically configurable via
ai_blocker/constants.py.
🏗️ Architecture
AI DevSec Gateway operates at the boundary between your local development environment and the cloud.
graph TD
subgraph Local Environment ["Local Development Network"]
IDE[VS Code / Cursor / IDE]
CLI[ai-blocker CLI]
GUI[DevSec Gateway GUI]
Gateway((Local API Gateway <br> 127.0.0.1))
OS_Hosts[(OS Hosts File)]
end
subgraph External ["Target Inference"]
LocalLLM[Private Local LLM <br> Ollama / vLLM]
PublicCloud[Public Cloud <br> OpenAI / Anthropic]
end
IDE -->|1. Outbound API Request| OS_Hosts
OS_Hosts -->|2. Intercepted| Gateway
Gateway -->|3a. Route active| LocalLLM
Gateway -.->|3b. Audited pass-through| PublicCloud
Gateway -->|3c. Block active| Drop[Connection Refused]
For an in-depth dive into our modular structure, Deep Packet Inspection (DPI) plans, and Threat Models, read our Architecture Documentation.
✅ Current Capabilities vs Roadmap
This project is intentionally explicit about what is implemented today and what remains future work.
| Area | Current status |
|---|---|
| Hosts-file blocking | Implemented and used by default in GUI/CLI. |
| Local API gateway | Implemented for loopback HTTP routing to compatible local LLM servers. |
| Backend selection | Implemented in CLI with hosts default and experimental firewall-redirect dry-run support. |
| TLS/DPI interception | Implemented. On-the-fly Root CA generator with OS trust store integration for surgical HTTPS inspection. |
| Token usage monitoring | Implemented. Live /stats endpoint + UI dashboard with auto-refresh. |
| DLP & guardrails toggle | Implemented. Per-session enable/disable flags for DPI and semantic guardrails. |
| Expanded DLP patterns | Implemented. Detection of internal IPs (RFC 1918), cloud tokens (GCP, HF, Azure, npm, Slack), database connection strings, and environment variable references. |
| Enhanced guardrails | Implemented. Leetspeak obfuscation detection and data exfiltration URL patterns (pastebin, gist, webhook). |
| eBPF/WFP kernel interception | Planned future backend work, not active runtime behavior. |
The roadmap is ambitious, but releases should be evaluated by the implemented capabilities above.
🚀 Quick Start
1. Python Package (Pip)
The fastest way to get started with the headless CLI.
pip install ai-devsec-gateway
# Native CLI commands are now available globally:
ai-blocker --status
ai-devsec-gateway --block
ai-devsec-gateway --unblock
1.1 Backend Selection & Dry-Run
Use hosts as the default backend, or explicitly inspect the experimental firewall backend with dry-run first:
# Show available backends
ai-blocker --list-backends
# Default behavior (hosts backend)
ai-blocker --backend hosts --block work
# Experimental backend plan only (no network changes applied)
ai-blocker --backend firewall-redirect --block work --dry-run
2. Package Managers (macOS & Windows)
macOS (Homebrew):
brew tap Akunimal/ai-devsec-gateway https://github.com/Akunimal/AI-Router-Blocker-AiO
brew install ai-devsec-gateway
sudo ai-blocker --status
Windows (Scoop):
scoop bucket add ai-devsec-gateway https://github.com/Akunimal/AI-Router-Blocker-AiO.git
scoop install ai-devsec-gateway
ai-blocker --status
3. Portable GUI Binaries
If you prefer a rich visual interface without installing Python:
- Visit the Releases page.
- Download the executable for your OS (
.exe, macOS binary, or Linux AppImage). - Run the application (it will automatically request Admin/sudo privileges when toggling the network switch).
🔒 Security Model
- Zero-Persistence BYOK: API keys for the semantic DevSec auditor are strictly kept in-memory. They are never written to disk, preventing supply-chain credential theft.
- Surgical OS Modifications: The engine uses targeted
sed-like parsing to inject# AI-Blockmarkers into the OS hosts file. It guarantees absolute isolation from your existing DNS mappings. - Isolated Telemetry: The application itself contains absolutely zero tracking, analytics, or hidden background phone-home mechanics.
🤝 Open Source & Governance
We believe that security tools must be 100% transparent. This project is built under strict open-source governance:
- Architecture Guide: Complete technical specifications.
- Contributing Guide: Standards and PR templates.
- Code of Conduct: We foster a welcoming community.
- Security Policy: Responsible vulnerability disclosure.
- License: MIT Licensed.
🗺️ Roadmap & Future Vision
We are actively evolving towards an enterprise Zero-Trust DLP Engine. Upcoming milestones include:
- Cloud-Assisted Semantic DLP: Optional integration with OpenAI API for deep semantic analysis of prompts.
- On-Device Semantic Guardrails: Embed a lightweight ONNX runtime for real-time prompt safety classification.
- eBPF Kernel Telemetry: Detecting
.git/configexfiltration directly at the Linux kernel level. - Confidential Computing: Running the Gateway within Trusted Execution Environments (TEEs) like Intel SGX.
Explore our ROADMAP.md to see the full vision.
Audit the unseen. Route the restricted. Trust no packets.
The DevSecOps Gateway for the AI era.
Metadata
Release files for ai-devsec-gateway 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_devsec_gateway-1.6.1.tar.gz | 78.5 kB | With provenance | Details for ai_devsec_gateway-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_devsec_gateway-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for ai_devsec_gateway-1.6.1-py3-none-any.whl |
Total release size: 140.0 kB
Release files / ai_devsec_gateway-1.6.1.tar.gz
| Download URL | ai_devsec_gateway-1.6.1.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42f21bf090bbe723bcf2ddd3bf67547e25efd552acd28b3a96f896c78848c9d1
|
|
BLAKE2b-256 checksum How to use checksums |
0d3082bd84ef8a0d4bf04f697f52885fa126144699e5a3b581bf412757d7d4c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logRelease files / ai_devsec_gateway-1.6.1-py3-none-any.whl
| Download URL | ai_devsec_gateway-1.6.1-py3-none-any.whl |
|---|---|
| Size | 61.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7815093ccec436acc4d25690b52a1fcc19441339420d28660fc71534a9ec0b5c
|
|
BLAKE2b-256 checksum How to use checksums |
4425b377c6d8184fdd46b92fe870dc7dffa38a9f223aa1f103b346eedb2ee8a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logSecurity for ai-devsec-gateway 1.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ai_devsec_gateway-1.6.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.