Sign inSign up

bastionsoft/bastion-lens

By bastionsoft

Updated 3 months ago

Self-hosted, air-gapped LLM prompt-injection firewall + audit console.

Image
Security
Monitoring & observability
0

435

bastionsoft/bastion-lens repository overview

Bastion Lens

Catch prompt injection where it actually hits you — inside the documents your RAG retrieves and the results your agents act on — and see every catch in one console.

Bastion Lens is a self-hosted, air-gapped LLM firewall with a built-in audit console. It runs entirely on CPU, makes no outbound calls, and screens the content your app trusts — retrieved chunks, tool results, uploads — not just the user's message.

Bastion Lens — detections by origin

Why teams run it

  • Indirect-injection visibility. Every detection is tagged by where it came from — rag_document, tool_result, user_prompt — so you can see the attacks a proxy-in-front-of-the-LLM never sees.
  • In-process detection. A small, purpose-built classifier (CPU, single-digit ms). No GPU, no tokens billed, no data leaving the box.
  • One console. Live feed, filterable detections, stats, retention, a playground, and a threshold simulator — over a local SQLite store.

Quickstart

docker run -d --name bastion -p 8080:8080 -v bastion-data:/data \
  -e BASTION_ADMIN_KEY=change-me \
  bastionsoft/bastion-lens:cpu

Also on GHCR: ghcr.io/bastion-soft/bastion-lens:cpu (same image).

Then open http://localhost:8080/console, sign in with the admin key, and create an ingest key to stream detections from your apps — in the console under Settings → API keys → Create key (the token is shown once; copy it then), or via the API:

curl -s -X POST http://localhost:8080/v1/keys \
  -H "X-API-Key: change-me" -H "Content-Type: application/json" \
  -d '{"name":"my-app","role":"ingest"}'

Point your app's SDK telemetry at it (BASTION_TELEMETRY_ENDPOINT + BASTION_TELEMETRY_KEY) and detections appear live. API at /v1/*, OpenAPI at /docs, health at /health.

Bastion Lens — live feed

Tags

  • cpu, latest-cpu — latest CPU build (amd64 + arm64)
  • X.Y.Z-cpu — pinned version

License

Source-available under the Business Source License 1.1 — free to self-host for your own use; you just can't offer it to others as a hosted service. A commercial license unlocks the enterprise tier (multi-tenant, RBAC, SIEM export, the multilingual model). Contact https://bastionsoft.com or [email protected].

Tag summary

Content type

Image

Digest

sha256:ab8cddd8e

Size

322.1 MB

Last updated

3 months ago

docker pull bastionsoft/bastion-lens