gitwtfhub

wtf is ai-firewall?

bossandboss/ai-firewall — explained in plain English

Analysis updated 2026-07-25

1TypeScriptAudience · ops devopsComplexity · 4/5LicenseSetup · hard

TL;DR

AI Firewall is a security gateway that inspects prompts and responses between your apps and AI APIs, redacting secrets and blocking prompt injection attacks. It logs every request with EU AI Act risk categories.

Mindmap

mindmap
  root((repo))
    What it does
      Inspects prompts
      Redacts secrets
      Blocks injection attacks
      EU AI Act logging
    Tech stack
      TypeScript
      Go
      React
    Use cases
      Protect AI apps
      Audit AI usage
      Prevent data leaks
    Audience
      Developers
      DevOps teams
    Limitations
      Deterministic detection
      No ML classifier yet
      Roadmap improvements

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Protect customer data by redacting AWS keys and tokens before prompts reach external AI APIs.

REASON 2

Block prompt injection and jailbreak attempts from reaching your large language model provider.

REASON 3

Audit every AI request with EU AI Act risk category tags for compliance tracking.

REASON 4

Monitor detection precision and latency live using the built-in benchmark dashboard.

What's in the stack?

TypeScriptGoReact

How it stacks up

bossandboss/ai-firewall0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardhardeasy
Complexity4/54/52/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires running both a Go edge proxy and a TypeScript management plane, plus configuring multi-provider API keys and a persistent audit log store.

Free for non-production use and production use up to 10,000 requests per day, offering it as a hosted service requires a commercial license. Converts to Apache 2.0 in 2030.

Wtf does this do

AI Firewall is a security gateway that sits between your applications and large language model APIs like those from OpenAI, Anthropic, and Google. Its job is to inspect outgoing prompts before they leave your network and incoming model responses before they reach your users. It redacts sensitive data such as AWS keys, API tokens, credit card numbers, and social security numbers. It also filters out prompt injection and jailbreak attempts, and it tags every request with a risk category under the EU AI Act, writing those tags to a persistent audit log. The project has two independent pieces. A Go edge proxy handles the fast, low latency work: authenticating requests, scanning for attack phrases using a string matching algorithm called Aho-Corasick, redacting secrets with regex patterns, and intercepting streaming responses to scrub secrets even when they are split across chunk boundaries. A TypeScript management plane handles multi-provider forwarding, audit persistence, API key management, and a React operations dashboard with a playground, rules engine, stream visualizer, and live benchmark screen. The README is unusually honest about what works and what does not. The TypeScript gateway, Go proxy, and dashboard are all marked as working and unit-tested. A live benchmark screen measures precision, recall, and latency at runtime against a 30-case labeled corpus, with no pre-recorded numbers. However, an ML classifier for detecting paraphrased or multilingual attacks is not implemented yet, and distributed deployment, rate limiting, and PostgreSQL storage remain on the roadmap. The current detection layer is purely deterministic, relying on keyword matching and regular expressions. This makes it fast and precise on known patterns but weak against paraphrased or multilingual attacks. The benchmark screen exposes this gap on purpose, and adding an ONNX transformer classifier is the top roadmap priority. The code is available under the Business Source License 1.1, which permits free non-production use and production use up to 10,000 inspected requests per day. Offering it as a competing hosted service requires a commercial license. The license automatically converts to Apache 2.0 on July 23, 2030.

Yoink these prompts

Prompt 1
Set up AI Firewall as a proxy between my Node.js app and the OpenAI API so that outgoing prompts are scanned for sensitive data like API keys and credit card numbers.
Prompt 2
Configure AI Firewall to redact AWS secret keys from streaming responses before they reach my end users.
Prompt 3
Use the AI Firewall React dashboard to view the audit log of risk-tagged requests and test detection rules in the playground.
Prompt 4
Run the AI Firewall live benchmark screen to measure precision and recall against my own labeled test cases.

Frequently asked questions

wtf is ai-firewall?

AI Firewall is a security gateway that inspects prompts and responses between your apps and AI APIs, redacting secrets and blocking prompt injection attacks. It logs every request with EU AI Act risk categories.

What language is ai-firewall written in?

Mainly TypeScript. The stack also includes TypeScript, Go, React.

What license does ai-firewall use?

Free for non-production use and production use up to 10,000 requests per day, offering it as a hosted service requires a commercial license. Converts to Apache 2.0 in 2030.

How hard is ai-firewall to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is ai-firewall for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.