Files
urutau/CHANGELOG.md
T
Lucas RayanandClaude Opus 5.5 b4a2c2c9ec
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 1m29s
CI / Tests (Linux, race detector) (push) Failing after 1m48s
CI / Dependency audit (push) Successful in 21s
Release / ci (push) Failing after 1m50s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
feat: Urutau 1.0.0, lightweight threat intelligence and web analytics
Always-on Go service (stdlib only) that follows the Traefik JSON access
log, the sshd log and the fail2ban log of a host, classifies attacks,
scores sources, keeps bounded aggregates with snapshots, and serves an
embedded dashboard with live updates, offline geolocation (DB-IP Lite),
privacy-friendly traffic analytics, an exportable blocklist and
token-authenticated federation between instances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:13:34 -03:00

7.8 KiB

Changelog

English · Português

Format based on Keep a Changelog; versions follow SemVer.

[Unreleased]

[1.0.0] - 2026-11-14

First release.

Added

  • Log collection from the Traefik JSON access log, /var/log/auth.log (sshd) and /var/log/fail2ban.log, followed through rotation and truncation, with a bounded line size and a backfill of rotated files on the first start.
  • Classification into ok, notfound, scanner, exploit, bruteforce, ssh-fail, ssh-probe, ssh-ok and ban, with percent-decoding (twice) of request paths against evasion.
  • IP scoring by category weight: 50 or more is hostile, 10 or more is suspicious.
  • Rolling state of up to 7 days (minute buckets, top lists, per-IP detail and a live feed), saved to a snapshot file every 60 seconds and on shutdown, restored with the file offsets so a restart never replays a log.
  • Embedded dashboard (English and Portuguese, light and dark) with KPIs, a timeline, an IP table with filters and sorting, an IP detail drawer, a live feed over Server-Sent Events, top paths, domains, User-Agents and users, per-host and per-source status.
  • Token login with a signed HttpOnly, SameSite=Strict session cookie and a per-IP rate limit; bearer token for the API.
  • JSON API: /api/health, /api/v1/summary, /api/v1/ips, /api/v1/ip/{ip}, /api/v1/events/stream.
  • Exportable blocklist as /api/v1/blocklist.txt and /api/v1/blocklist.json.
  • Federation: --peer name=https://url aggregates other instances. A hub only calls GET /api/v1/peer/export?range=1h|24h|7d ({"v":1,"summary":...,"traffic":{...}}, top 500 IPs with detail, cached 5 s) every 15 s, with a 4 s timeout, an 8 MB limit, no redirects, https required outside loopback, and sanitized, capped peer data. --peer-allow / URUTAU_PEER_ALLOW limits the source CIDRs of the export.
  • Offline geolocation (country, city, ASN) from the DB-IP Lite databases (CC BY 4.0), downloaded and refreshed by Urutau (--geo-dir, --geo-update) and read by a built-in, dependency-free MMDB reader.
  • User-Agent parsing into browser, operating system, device, bots and attack tools.
  • Privacy-friendly web analytics for legitimate traffic (Traffic tab): unique visitors by a daily-salted hash, pages, referrers, countries, browsers, devices, latency p50 and p95, bytes and a world map. The IP of a legitimate visitor is never persisted. Threats and Traffic are separate tabs.
  • Reverse DNS enrichment of listed IPs.
  • Noise filters: --trusted / URUTAU_TRUSTED (alias --ignore) drops events from trusted CIDRs, and --monitor-ua / URUTAU_MONITOR_UA keeps benign monitoring requests (such as Uptime-Kuma) out of the traffic numbers.
  • urutau doctor [--json] to check the configuration, the sources, the data directory, the geolocation databases and the snapshot; the JSON output carries geo and state.
  • --monitor-from / URUTAU_MONITOR_FROM (a monitor User-Agent only counts from those networks; without it only ok answers are filtered) and --domains / URUTAU_DOMAINS (analytics domain allowlist, *.example.com accepted).
  • urutau healthcheck, the image HEALTHCHECK (the image has no curl, 28.5 MB).
  • Default --ignore widened: 192.168.0.0/16, fc00::/7, fe80::/10, 100.64.0.0/10, 169.254.0.0/16 join the previous ranges.
  • --admin-users / URUTAU_ADMIN_USERS: admin immunity lasts 24 hours after the last successful SSH login of those users (off unless the list is set; a login in the same second as a strong attack gives no immunity) and a later strong signal cancels it. The blocklist takes ?family=4|6.
  • Requests framed by another page (Sec-Fetch-Site cross-site/same-site or a sub-resource Sec-Fetch-Dest) create an IP record like any other but weigh 0.25 per event (at most 30 points per IP from them, never a strong signal; ignored with an attack-tool User-Agent); Traefik must log Sec-Fetch-Site, Sec-Fetch-Dest and Referer.
  • Serialized wrong-login attempts from a blocked client (1 s delay doubling to 30 s, parallel ones get 429 at once); the correct token always gets in.
  • Compose mounts only /data/coolify/proxy/logs and the dedicated host directory /var/log/urutau (read-only); documented how to prepare it (rsyslog copy of sshd, fail2ban logtarget, logrotate), the known logger -t sshd limitation, how to point Traefik's access log at /traefik/logs/access.log on Coolify and to keep Urutau on a network shared only with Traefik.
  • --trusted-proxy / URUTAU_TRUSTED_PROXY (default: loopback only; the compose file creates the urutau-edge network, 10.250.0.0/24, and trusts just that): X-Forwarded-For is accepted only from these proxies, read right to left, for the login rate limit and --peer-allow.
  • Multi-arch container image (linux/amd64, linux/arm64), docker-compose.yml and a Coolify deployment guide.
  • Gitea CI (format, vet, race tests, govulncheck, UI translation coverage, image smoke test), a release workflow that reuses an already published image, a weekly audit, local hooks and scripts/check.sh.
  • Bilingual documentation (English and Portuguese).

Security

  • URUTAU_TOKEN must have at least 32 characters and about 128 bits of estimated entropy (length times Shannon entropy; periodic or sequential tokens are refused) (generate with openssl rand -base64 48; -hex 32 also works). Peer tokens follow the same rule and must differ from URUTAU_TOKEN; peers without a token are refused. Secrets can come from URUTAU_TOKEN_FILE and URUTAU_PEER_TOKEN_FILE, and each peer can have its own client credential, URUTAU_PEER_TOKEN_<NAME> (the general one is the fallback). The export accepts only the server token URUTAU_PEER_TOKEN; per-peer values never open it, and peer names that collide in the variable (my-peer/my_peer) are refused. An admin flag from a peer is ignored and a peer's Strong only counts with a score of 50 or more.
  • Revocable sessions (random in-memory id, logout revokes and closes the live stream, restart invalidates), cross-site login and logout rejected, a blocked login answers 429 while the correct token still gets in after a 1 second delay, failed bearer tokens count, IPv6 limited per /64, Referrer-Policy: same-origin.
  • /api/health returns only {"status":"ok"}; log file paths are never shown in the UI or to peers.
  • Scanner and exploit hits answered with 2xx or 3xx weigh 0.5; a hostile level needs a score of 50 plus a strong signal (attack tool, two or more categories, a ban, or a refused strong exploit); an IP with a successful SSH login is never hostile and never blocklisted; the blocklist only holds globally routable IPs outside --ignore and --trusted; IPv6 is aggregated by /64 and exported as x:x:x:x::/64; up to 20,000 tracked IPs and a 160 MiB soft memory limit.
  • A domain gets an analytics slot only after a 2xx answer; /.gitignore, /.git-credentials and similar paths are scanner hits; snapshots from earlier versions migrate without losing traffic history and inactive domains are pruned; top pages normalize token-looking segments to :id.
  • The peer token only opens GET /api/v1/peer/export (other routes answer 403 to it, URUTAU_TOKEN gets 401 there, and the export is 404 without a peer token).
  • HTTP server timeouts, MaxHeaderBytes of 16 KB, POST /login capped at 4 KB and at most 20 live-stream clients (503 with Retry-After, 20 s heartbeat).
  • A corrupt snapshot is moved to urutau-state.gob.corrupt and the service starts empty, reading the logs again.
  • Built with Go 1.26.11, which fixes five standard library vulnerabilities.
  • The IP address of a legitimate visitor is never persisted; unique visitors use a hash with a daily salt.
  • Hostile log content is limited in length and escaped on output; the dashboard ships a strict Content-Security-Policy and the usual hardening headers.
  • --insecure-no-auth is refused unless the bind address is loopback.