Files
harpia/SECURITY.md
T
Lucas RayanandClaude Opus 5.5 90ece32dac 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>
2026-11-03 10:17:14 -03:00

32 lines
3.0 KiB
Markdown

# Security policy
**English** · [Português](SECURITY.pt-BR.md)
Xexéu is defensive software, but it operates over active networks and processes untrusted remote responses: service banners, TLS certificates, and raw network packets may be malformed on purpose. Treat every target network response as untrusted.
## Reporting a vulnerability
Do not open a public issue with exploit details. Open a minimal issue asking for a private channel, or contact the maintainer through the Gitea profile listed on the repository. Include the affected version, the input shape, and a minimal reproduction when a private channel is available.
## Scope and threat model
- **Container hardening & privilege separation:**
- The `scanner` service runs with `cap_drop: [ALL]` and only `cap_add: [NET_RAW]`. It has no `NET_ADMIN`, no `SYS_ADMIN`, a read-only root filesystem (`read_only: true`), `no-new-privileges: true`, and writes exclusively to the dedicated `xexeu-sweeps` volume.
- The `xexeu` daemon (API, diff engine, dashboard) runs as an unprivileged user (UID 10001) with zero capabilities (`cap_drop: [ALL]`), a read-only root filesystem, and mounts the `xexeu-sweeps` volume as read-only (`:ro`).
- **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. 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.
## Out of scope
- Vulnerabilities in third-party libraries (SQLite, socket2, upstream Debian packages) already addressed upstream.
- Attacks requiring the operator to disable documented security controls (such as granting extra capabilities or publishing the daemon port without authentication).
- Detection heuristic completeness: version-based correlation is defensive guidance, not an absolute proof of exploitability.
## Supported versions
Only the latest `0.1.x` line is supported during the pre-release phase. There is no long-term support branch yet.