Please use GitHub Security Advisories on this repository:
- Go to the repository's Security tab.
- Click Advisories → Report a vulnerability.
This opens a private channel between you and the maintainers. Do not open a public issue for security reports.
Only the main branch is supported. Fixes will land on main; older commits are not patched.
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
/healthzDocker-internal and/statsaggregate 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).
- 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).
Run docs/pen-test-checklist.md before exposing any deployment publicly.