InferShield is an open-source security layer for LLM traffic. It sits between your application and a model provider, inspects every prompt and response that passes through it, scores the risk of each one and blocks the dangerous ones before they reach the model. It ships as three things that share one detection engine: an OpenAI-compatible proxy you point an SDK at, a browser extension for web chat interfaces, and a self-hosted platform with accounts, API keys, an audit log and a dashboard.
git diff to the analysis endpoint, which makes it usable as a pre-commit check for secrets and PII.Most teams put a hosted model behind an application with no inspection layer at all: the prompt goes out and whatever comes back is trusted. The result is that a support bot will happily recite another customer’s data, an agent will paste an API key into a chat, and a crafted input can talk the model out of its instructions. InferShield gives that traffic a checkpoint — a place where prompts are scored against known attack shapes, sensitive text is detected and redacted, sessions are checked for suspicious sequences, and every decision is written to an audit log you own.
Because it speaks the OpenAI wire format, adoption is mostly a configuration change rather than a code change, and because it is self-hosted, the prompts you are inspecting never leave your infrastructure to be inspected.
InferShield is young and its own README says so: the feature set is labelled v0.9.0, the implementation is a proof of concept, and detection is rule and pattern based rather than model based. The documented limits are worth reading before you rely on it — no ML detection, single-instance deployments only, in-memory session state, no correlation across different model providers, and coverage of known attack shapes rather than novel ones. Expect to read the policy rules and tune them for your own traffic, and treat the browser extension as a source build (load-unpacked) rather than a store listing.
Self-hosting also takes a little assembly: the backend is a Node.js service that runs migrations against PostgreSQL in its production profile, and the repository’s compose file does not include a database service, so you need to supply a DATABASE_URL (or run the backend directly with npm start, which uses SQLite and in-memory state). The bundled dashboard image expects a couple of static assets that live in the repository under a different path. None of that is hard, but it is not yet a single-command install.
MIT. InferShield is open source under the MIT licence — use, modify and self-host it freely, including commercially, provided the copyright notice is kept. Source and licence text: github.com/InferShield/infershield(released under the MIT licence, verified against the LICENSE file at the repository root).
Clone the repository, create a .env with a master key, and bring the stack up with Docker Compose once a database is attached. Then point your client at the proxy — base_url=http://localhost:8000/v1 — and optionally log in through the OAuth device flow so IDE clients such as Cursor or Copilot can authenticate without a stored API key. The dashboard listens on port 3000, the analysis API on 5000 and the proxy on 8000. The documentation folder covers quick start, threat model, attack catalogue, PII redaction and Windows installation.