feat(api): require an admin token for configuration changes

Group CRUD decides what the scanner sweeps, yet any client that reached the
API could change it. Writes now need XEXEU_ADMIN_TOKEN (or a token generated
at startup and printed as a ?token= link, like sabia ui), compared in
constant time, and a browser Origin must match Host. The dashboard keeps the
token for the tab and asks for it on 401. Reads are unchanged.

Also track .env.example: '.env*' in .gitignore had kept it out of the
repository, although the README tells operators to copy it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-03 10:17:14 -03:00
1 parent 36eadabc7c
commit 90ece32dac
17 files changed
+369 -28

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ Do not open a public issue with exploit details. Open a minimal issue asking for
- **Strict authorized scope:** Target expansion enforces the `[escopo]` configuration boundary. Any target or DNS resolution resolving outside authorized CIDR blocks is rejected at validation time, preventing accidental or unauthorized scanning.
- **Safe vulnerability identification:** Xexéu does not execute exploit payloads, perform credential brute-forcing, or execute denial-of-service tests. Checks are limited to passive banner matching and standard cryptographic handshakes.
- **Input and batch parsing:** Malformed packets, banner responses, and Parquet batch files must not panic the engine or cause memory exhaustion.
- **API exposure:** The API daemon listens on `127.0.0.1:8788` by default. Exposing it on an external network interface requires an authenticating reverse proxy.
- **API exposure:** The API daemon listens on `127.0.0.1:8788` by default. Configuration changes require the admin token (`XEXEU_ADMIN_TOKEN`, compared in constant time) and a same-origin request; reads are not authenticated, so exposing it on an external network interface still requires an authenticating reverse proxy.
- **Evidence integrity:** Findings and diff events must be reproducible from the same observations and feeds. Nondeterministic behavior is treated as a correctness and security defect.
- **Privacy & local-first:** There is no telemetry. Vulnerability feeds are cached locally in SQLite/Parquet; air-gapped offline import (`xexeu feeds import`) is fully supported.