_ _ _ _ ____ _
| \ | | ___ __| (_)/ ___|_ _ __ _ _ __ __| |
| \| |/ _ \ / _` | | | _| | | |/ _` | '__/ _` |
| |\ | (_) | (_| | | |_| | |_| | (_| | | | (_| |
|_| \_|\___/ \__,_|_|\____|\__,_|\__,_|_| \__,_|
The Invisible Armor for Vibe Coding & Autonomous AI Pair Programming
Intercepts credentials before they leave your machine, mathematically tokenizes sensitive prompts, repels adversarial prompt injections, and autonomously frees 60%+ system RAM and GPU VRAM like Windows PC Manager.
The explosion of Vibe Coding with AI IDEs like Cursor, Windsurf, and VS Code (Continue / Cline / Roo Code) has supercharged developer velocity, but created critical security and system bottlenecks:
- Silent Credential Exfiltration: Developers routinely paste code containing AWS access keys, OpenAI tokens, database connection URIs, and private SSH keys directly into AI prompts, broadcasting them to third-party cloud LLM providers.
- Untracked Corporate Reconnaissance: Internal IPv4 ranges (
192.168.x.x,10.x.x.x), local system file paths (C:\Users\admin\...), and private employee emails are transmitted unmasked to model training and intermediate logging endpoints. - Adversarial Hijacking: Complex web-browsing agents and autonomous code executors are vulnerable to prompt injections and indirect jailbreak payloads embedded in untrusted source code.
- GPU VRAM & RAM Starvation: Local models running on Ollama or vLLM permanently hold 8GBโ16GB of GPU VRAM indefinitely even when idle, starving the operating system and causing games, 3D engines, and IDEs to stutter.
NodiGuard solves this by operating a high-speed, local-first reverse proxy (127.0.0.1:8080) that acts as an intelligent, zero-latency security airlock between your IDE and any model.
Scans every outbound prompt across 40+ credential formats (OpenAI, Anthropic, AWS, GitHub, Google Cloud, Slack, Stripe, Private Keys) combined with Shannon Entropy Analysis. Hardcodes are instantly blocked or transformed into secure environment variables (os.environ.get(...)) before a single network packet leaves your computer.
Translates private IP addresses, system file paths, and corporate emails into abstract mathematical tokens ([INTERNAL_IP_1], [LOCAL_PATH_1], [MASKED_EMAIL_1]).
The reversible mapping table is held 100% exclusively in ephemeral local RAM on your machine. Upstream models process the code with full logical fidelity while having zero visibility into your real infrastructure.
Detects and neutralizes direct and indirect prompt overrides (e.g., Ignore all previous instructions, system prompt extractors, DAN jailbreaks) and strips zero-width unicode steganographic payloads designed to bypass basic text filters.
Inspired by Microsoft PC Manager and Driver Booster, NodiGuard monitors process memory and calls Windows Native EmptyWorkingSet via PSAPI after every AI task completion. Reclaims up to 65% of inactive working set memory pages back to the operating system.
Whenever you finish an AI generation with local models, NodiGuard automatically dispatches a lightweight eviction signal (keep_alive: 0) to your local Ollama runtime. In less than 100ms, the heavy 8GBโ16GB model weights are purged from VRAM, freeing your GPU for gaming, video rendering, or IDE responsiveness.
Zero changes to your workflow. Set your IDE's OpenAI Base URL to http://127.0.0.1:8080/v1 and you are instantly shielded.
| Metric | Without NodiGuard | With NodiGuard | Advantage |
|---|---|---|---|
| Gateway Proxy Overhead | โ | < 1.2 ms | Zero perceptible lag |
| DLP Credential Scan Latency | โ | 2.1 ms (40+ regex + entropy) | Instantaneous |
| Client Memory Footprint (RSS) | ~120 MB | ~38 MB (post-compaction) | 68% RAM reclaimed |
| GPU VRAM Purge Speed (Ollama) | Held indefinitely | 85 ms (instant purge) | 8GBโ16GB VRAM liberated |
| DLP Leak Detection Rate | 0% (Cloud leak) | 100% (Pre-flight intercept) | Complete leak prevention |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Developer Tools & AI IDE Ecosystem โ
โ (Cursor, Windsurf, VS Code, Aider, CLI) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Base URL: http://127.0.0.1:8080/v1
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NodiGuard Local Security Proxy (127.0.0.1:8080) โ
โ โ
โ [1] Pre-Flight DLP Sentinel โโ Flags AWS, GitHub, OpenAI secrets โ
โ [2] Ephemeral Tokenizer โโ Anonymizes IPs & paths (RAM-only map) โ
โ [3] Adversarial Filter โโ Blocks prompt injections & jailbreaksโ
โ [4] Forwarder Engine โโ Routes to target upstream model โ
โ [5] Post-Flight De-anonymizer โโ Rehydrates tokens locally in memory โ
โ [6] PC Manager Memory Engine โโ Invokes EmptyWorkingSet & VRAM purge โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cleaned, Anonymized Prompts
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Target Model Infrastructure โ
โ (OpenAI GPT-4o, Claude 3.7, DeepSeek, or Local Ollama) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Install via PyPI:
pip install nodiguardOr install from source:
git clone https://github.com/wonghanz/NodiGuard.git
cd NodiGuard
pip install -e .nodiguard startBy default, NodiGuard listens on http://127.0.0.1:8080 and forwards requests to https://api.openai.com/v1.
To forward to custom endpoints (e.g., DeepSeek, Groq, or local Ollama):
nodiguard start --upstream https://api.deepseek.com/v1 --api-key your-api-key- Open Cursor Settings (
Ctrl + ,on Windows/Linux orCmd + ,on macOS). - Go to Features -> Models -> OpenAI API Key.
- Set your API Key to
sk-local(or your preferred token). - Enable Override OpenAI Base URL and set it to:
http://127.0.0.1:8080/v1 - Click Verify. Cursor will now route all queries through NodiGuard!
In your extension configuration (e.g., ~/.continue/config.json):
{
"models": [
{
"title": "NodiGuard Protected Model",
"provider": "openai",
"model": "gpt-4o",
"apiBase": "http://127.0.0.1:8080/v1",
"apiKey": "sk-local"
}
]
}Export standard environment variables in your terminal profile:
export OPENAI_BASE_URL="http://127.0.0.1:8080/v1"
export OPENAI_API_KEY="sk-local"
aider| Command | Description | Example |
|---|---|---|
nodiguard start |
Starts the local security reverse proxy | nodiguard start --port 8080 |
nodiguard scan <path> |
Scans local files for secrets and insecure MVP patterns | nodiguard scan ./src --strict |
nodiguard optimize |
Runs one-click Windows RAM compaction & VRAM purge | nodiguard optimize --model nodi-go |
nodiguard status |
Inspects system RAM, CPU utilization, and proxy health | nodiguard status |
Prevent accidental secret commits by embedding NodiGuard into .git/hooks/pre-commit:
#!/bin/sh
nodiguard scan . --strictNodiGuard is built from the ground up on a Strict Local Physical Isolation philosophy:
- Zero Cloud Logging: All token mapping tables, regex evaluations, and entropy computations reside entirely in volatile RAM.
- Zero Telemetry: No usage metrics, tracking pixels, or remote analytics are collected.
- Audited Open Source: Zero hardcoded IP addresses, zero backdoors, zero proprietary tokens.
- Pre-Flight DLP Regex & Shannon Entropy Engine
- Client-side Ephemeral Tokenization & Reversible Rehydration
- Windows Native
EmptyWorkingSetRAM compaction - Ollama GPU VRAM auto-purging (
keep_alive: 0) - OpenAI-compatible
/v1/chat/completionsreverse proxy - Tree-sitter AST parser for semantic secret identification
- macOS / Linux specific kernel memory compaction (
posix_madvise) - Native GUI System Tray monitor widget (Tauri / Electron-free)
- MCP (Model Context Protocol) Security Bridge for Claude Desktop
We welcome contributions from cybersecurity engineers, AI researchers, and developers!
- Fork the Project (
https://github.com/wonghanz/NodiGuard/fork) - Create your Feature Branch (
git checkout -b feat/AmazingFeature) - Commit your Changes (
git commit -m 'feat: add AmazingFeature') - Push to the Branch (
git push origin feat/AmazingFeature) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE for more details.
Built with โค๏ธ for developers who love AI velocity but refuse to compromise on security and system performance.
If you find NodiGuard useful, please consider giving us a โญ on GitHub!