89 lines
5.5 KiB
Markdown
89 lines
5.5 KiB
Markdown
# Security policy
|
|
|
|
**English** · [Português](SECURITY.pt-BR.md)
|
|
|
|
Acauã is defensive software, but it processes hostile input: packet captures,
|
|
Zeek logs and flow records may be malformed on purpose. Treat every dataset 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:** the container runs as an unprivileged user (`acaua`, UID 10001),
|
|
with a read-only root filesystem (`read_only: true`), all capabilities dropped
|
|
(`cap_drop: [ALL]`), and security hardening (`no-new-privileges:true`).
|
|
- **Input parsing:** a malformed log line must not panic the daemon, exhaust
|
|
memory or escape the configured data directory.
|
|
- **Path handling:** dataset paths are resolved and confined to the configured
|
|
root; symbolic links are not followed outside it.
|
|
- **Authentication:** login is always required; MFA (TOTP) is mandatory for
|
|
administrators and optional for analysts. The only routes open without a
|
|
credential are `GET /api/health`, `GET /api/auth/state`, `POST /api/auth/{bootstrap,login,mfa,password-change-required}` and the login assets (`/login.html`, `/login.js`, `/app.css`, `/logo.png`, `/i18n.js`, `/i18n-en.js`). Sessions, API tokens (`read`/`admin`) and an audit log are kept
|
|
in the data directory. A password or MFA change revokes admin tokens and keeps
|
|
read tokens. `/api/analyze` is admin-only.
|
|
- **Attempt limits:** wrong passwords count per username and client address
|
|
(an IPv4 address or an IPv6 /48), and an address also has its own overall limit;
|
|
counts fade by one every 15 minutes. On top of that each username has a budget of
|
|
100 failures in any 24 hours from addresses it has not logged in from, counted over
|
|
a true rolling window: a slot opens only when a failure turns 24 hours old. Once spent, attempts from unknown addresses are refused
|
|
before the password is evaluated, even with the right password. Usernames with no
|
|
account behave the same. An address with a completed login (after MFA, if
|
|
required) in the last 30 days skips the budget but not the per-address limit; each
|
|
account keeps at most 10, as hashes rather than addresses. A password or MFA change
|
|
from a live session keeps only the address that made it; promotion to administrator
|
|
and `acaua auth reset` clear the list.
|
|
**The limit that remains:** an attacker can stop logins from a *new* address for
|
|
a real user for the whole budget window, and for as long as they keep spending the
|
|
slots as they open. Known addresses, existing sessions and API tokens keep working,
|
|
and `acaua auth reset` clears the budget; an attacker still running can spend it
|
|
again. Up to 100 guesses a day per account remain possible, so long passwords
|
|
matter, and MFA remains recommended for analysts.
|
|
Crossing the budget writes one `login.budget_exhausted` audit event per account
|
|
per 24 hours; a username with no account writes none. The audit log has no rotation yet: failed logins add to it, so watch
|
|
its size on an exposed instance. Budgets of real accounts survive a restart;
|
|
per-address counts are in memory and a restart clears them. MFA codes and session
|
|
password checks use a separate persistent per-user count, reachable only past the
|
|
password or from a live session.
|
|
- **Browser headers:** every response has a CSP (`script-src 'self'`,
|
|
`frame-ancestors 'none'`), `X-Frame-Options: DENY`, `nosniff` and
|
|
`Referrer-Policy: no-referrer`. `style-src` allows `'unsafe-inline'`, which the
|
|
report's inline stylesheet and Paged.js need.
|
|
- **API exposure:** `serve` binds to `127.0.0.1` by default and refuses to start
|
|
without an explicit transport (`local`, `tls` or `proxy`). Publishing beyond
|
|
loopback is an operator decision and needs `tls` or `proxy`; `local` refuses a
|
|
non-loopback `--bind` unless `ACAUA_RUNTIME=container`, where `ACAUA_PUBLISHED`
|
|
is the control. In `proxy` mode the daemon port must be reachable only by the
|
|
proxy. A bare
|
|
`docker run -p` without `ACAUA_PUBLISHED` is not detected (login stays mandatory).
|
|
- **Secret key:** MFA secrets are sealed with a key stored in the data volume by
|
|
default, which does not protect against copying the volume; prefer a Docker
|
|
secret via `ACAUA_SECRET_KEY_FILE`.
|
|
- **Host access:** anyone with Docker access on the host can run
|
|
`acaua auth reset` and take over any account.
|
|
- **Evidence integrity:** alert evidence must be reproducible from the same
|
|
input and code version. Silent nondeterminism is a correctness and security
|
|
issue.
|
|
- **Updates:** updates are delivered as verified multi-arch container images.
|
|
The daemon terminates gracefully upon receiving `SIGTERM` without data corruption.
|
|
- **Privacy:** there is no telemetry. Retention defaults to seven days of
|
|
normalized events; the operator is responsible for local law and policy.
|
|
|
|
## Out of scope
|
|
|
|
- Vulnerabilities in third-party Zeek, DuckDB or operating-system packages
|
|
that are already fixed upstream.
|
|
- Attacks that require the operator to disable the documented security controls
|
|
(for example, running `serve` as root on a public interface).
|
|
- Detection quality claims: the pillars are defensive heuristics, not absolute guarantees.
|
|
|
|
## Supported versions
|
|
|
|
Only the latest `0.1.x` line is supported while the project is pre-alpha. There
|
|
is no long-term support branch yet.
|