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>
2.9 KiB
Contributing to Urutau
English · Português
Thanks for helping. Urutau is a lightweight threat intelligence panel for self-hosted servers: it reads logs, classifies hostile activity and scores IPs. The most useful contributions right now are tests, log fixtures, new detection rules and documentation.
- Defensive use only. Urutau reads logs on servers you own or administer. Do not add features that send traffic to the IPs it lists, scan third parties or hide what the tool does.
- Log content is hostile. Every field that comes from a log (path, User-Agent, user name, host, jail) was written by an attacker. It must be length-limited when parsed, never executed or interpolated into a command, and escaped on output. A new parser comes with tests for malformed and oversized input.
- A classification change pins its category. New or changed detection rules need a test that shows the expected category and, for a weight change, the resulting score.
- Standard library first. The binary is static and dependency-free on purpose. Adding a module needs a clear reason, and
go.sumthen enters the image inputs. - 100% English codebase. Source code, comments, scripts, workflows and commit messages are in English. The dashboard is bilingual (English and Portuguese in
internal/server/web/i18n.js).
Workflow
scripts/install-hooks.sh
scripts/check.sh
check.sh validates gofmt, go vet, UI translation coverage, shell script syntax, workflow YAML files and docker compose config in seconds, skipping with a warning whatever the machine lacks. scripts/check.sh --full also runs go test -race ./... and govulncheck.
Interface and translation
Both dictionaries in internal/server/web/i18n.js must have exactly the same keys, and visible text in the HTML needs a data-i18n attribute. When adding or changing visible text, run node scripts/check-ui-i18n.mjs and supply both languages.
Documentation
Always maintain document pairs: every *.md and docs/* file has an English version and a Portuguese version (*.pt-BR.md, docs/pt-BR/). File names are translated only when the word changes (for example architecture.md and arquitetura.md). Do not use em dashes.
Commits and releases
Commits follow Conventional Commits 1.0.0 in English (feat:, fix:, chore:, ci:, docs:, refactor:, test:, perf:, build:). Versions follow SemVer 2.0.0. Update the CHANGELOG in the same pull request as a user-visible change.
Releases are multi-arch container images (linux/amd64 and linux/arm64) published to the Gitea registry. Pushing a v* tag triggers the release workflow, which reuses the image already built for the same inputs when there is one, and creates the Gitea release from the CHANGELOG section.
License
By contributing, you agree to license your work under MIT or Apache-2.0, matching the rest of the project.