feat: Urutau 1.0.0, lightweight threat intelligence and web analytics
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

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>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-14 16:13:34 -03:00
commit b4a2c2c9ec
99 files changed
+15403

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
# Urutau: reads the Traefik access log, sshd auth log and fail2ban log of the
# host (read-only), classifies what it sees and serves the dashboard.
#
# cp .env.example .env # set URUTAU_TOKEN (openssl rand -base64 48)
# docker compose pull && docker compose up -d # operators: published image
# docker compose up -d --build # developers: local build
name: urutau
services:
urutau:
image: ${URUTAU_IMAGE:-git.lucasrguerra.dev.br/ciberfauna/urutau}:${URUTAU_VERSION:-latest}
build: .
environment:
# Required: the service refuses to start without it (32+ characters and
# 128+ bits of entropy). Alternatively mount a file and set URUTAU_TOKEN_FILE.
URUTAU_TOKEN: ${URUTAU_TOKEN:-}
URUTAU_AUTH_LOG: /logs/host/auth.log
URUTAU_FAIL2BAN_LOG: /logs/host/fail2ban.log
URUTAU_NAME: ${URUTAU_NAME:-urutau}
# Your own servers: their events are dropped entirely (comma separated CIDRs/IPs).
URUTAU_TRUSTED: ${URUTAU_TRUSTED:-}
# Federation: other instances this one aggregates, e.g. hostinger=https://urutau.example.org
URUTAU_PEERS: ${URUTAU_PEERS:-}
# Shared secret for federation (32+ characters, different from URUTAU_TOKEN);
# it only opens /api/v1/peer/export. Empty disables the export.
URUTAU_PEER_TOKEN: ${URUTAU_PEER_TOKEN:-}
# Only these source networks may call the export (empty: any with the token).
URUTAU_PEER_ALLOW: ${URUTAU_PEER_ALLOW:-}
# Reverse proxies whose X-Forwarded-For is trusted. Only the dedicated
# urutau-edge network below, which holds nothing but this service and the
# reverse proxy: any other container there could forge client IPs.
URUTAU_TRUSTED_PROXY: ${URUTAU_TRUSTED_PROXY:-10.250.0.0/24}
# Optional: analytics domain allowlist (exact names or *.example.com) and the
# networks the monitoring User-Agents come from.
URUTAU_DOMAINS: ${URUTAU_DOMAINS:-}
URUTAU_MONITOR_FROM: ${URUTAU_MONITOR_FROM:-}
# SSH users whose successful logins keep their IP out of the blocklist (24 h).
URUTAU_ADMIN_USERS: ${URUTAU_ADMIN_USERS:-}
# Geo database refresh interval (0 disables the download).
URUTAU_GEO_UPDATE: ${URUTAU_GEO_UPDATE:-24h}
# Match the host time zone: fail2ban.log timestamps are local time.
TZ: ${TZ:-UTC}
ports:
- "${URUTAU_PUBLISH:-127.0.0.1:8790}:8790"
volumes:
# Only a dedicated Traefik log directory, never the whole proxy directory
# (it holds acme.json and the dynamic configuration). Point Traefik's
# accesslog.filepath at /traefik/logs/access.log, which Coolify keeps in
# /data/coolify/proxy/logs on the host.
- /data/coolify/proxy/logs:/logs/traefik:ro
# A dedicated host directory holding only the sshd and fail2ban logs
# (rsyslog copies sshd there; fail2ban's logtarget points there). A
# directory, not single files: logrotate recreates them by rename, and a
# file bind mount would keep following the old inode. See docs/docker.md.
- /var/log/urutau:/logs/host:ro
- urutau-data:/data
group_add: ["4"] # adm: can read the logs in /var/log/urutau
networks: [urutau-edge]
read_only: true
cap_drop: [ALL]
security_opt:
- no-new-privileges:true
mem_limit: 256m
cpus: 0.5
restart: unless-stopped
volumes:
urutau-data:
# Shared only with the reverse proxy (attach it: docker network connect
# urutau-edge <proxy>). The fixed subnet is what URUTAU_TRUSTED_PROXY trusts.
networks:
urutau-edge:
name: urutau-edge
ipam:
config:
- subnet: 10.250.0.0/24