Skip to content

Security: alanfrigo/brain

Security

SECURITY.md

Security policy

Reporting a vulnerability

Please use GitHub Security Advisories on this repository:

  1. Go to the repository's Security tab.
  2. Click Advisories → Report a vulnerability.

This opens a private channel between you and the maintainers. Do not open a public issue for security reports.

Supported versions

Only the main branch is supported. Fixes will land on main; older commits are not patched.

Threat model

BRAIN is a single-user app. The intended security perimeter is documented in docs/security.md and verified by docs/pen-test-checklist.md. The hard guarantees:

  • Zero unauthenticated endpoints (other than /healthz Docker-internal and /stats aggregate counts).
  • GitHub username allowlist via ALLOWED_GITHUB_USER.
  • FastAPI never publicly exposed; only the reverse proxy is reachable.
  • Internal HS256 JWT between web and api with a 5-minute TTL.
  • Admin endpoint gated by a separate token (ADMIN_REINDEX_TOKEN).
  • Read-only vault mount.

A vulnerability is anything that lets an unauthenticated user reach a protected endpoint, lets an authenticated non-allowed user reach any endpoint, or lets a single-vault user escalate beyond their own data (e.g. read other notes than they could via the UI).

Not in scope

  • Adversarial content inside your own vault. BRAIN's prompt-injection mitigations are best-effort; treat the chat output accordingly when indexing untrusted notes.
  • Denial of service from authenticated users.
  • Vulnerabilities in third-party services (Voyage, OpenRouter, GitHub, Cloudflare, Tailscale).

Pre-deploy checks

Run docs/pen-test-checklist.md before exposing any deployment publicly.

There aren't any published security advisories