Umbrella for security work beyond #14 (which covers audit logging, rate limiting, quotas, user disable). Two halves:
The software
- fuzz every parser that eats attacker-controlled bytes: the pkt-line reader in gitd, the SSHSIG and commit parsers in internal/sig, the armor decoder (the ssh tokenizer already has fuzz targets — extend the pattern)
- web security headers: CSP, X-Frame-Options, Referrer-Policy — none are set today; raw file serving already has nosniff
- dependency hygiene: govulncheck wired into the test loop, periodic review of the (deliberately short) module list
- constant-time comparison audit for every token/hash check
- a written threat model in docs/: what the forge trusts, what it never does (execute repo content, hold a signing key, serve repo HTML on its origin), where the boundaries are
- signed release artifacts (with #26)
The host (bay1 pattern, documented for any instance)
- unattended-upgrades for OS security patches; reboot policy
- tighter systemd sandboxing: SystemCallFilter=@system-service, RestrictAddressFamilies, PrivateDevices, LockPersonality on top of the existing ProtectSystem/NoNewPrivileges set
- auth throttling on both SSH surfaces (gitbayd port 22 via #14 ssh_auth_rate; admin sshd 2222 via MaxStartups/fail2ban)
- database: verify file modes, consider continuous replication (litestream-style) alongside the nightly archive and provider snapshots
- basic monitoring: disk, service failures, certificate renewal — journald + a webhook to somewhere visible
referenced in commit 2e6467a72f: Audit logging, auth throttling, pack limits, user disable
2026-08-24 21:40