What's New in v0.8.0
Architecture & Packaging
- Modular 5-Subpackage Layout: Reorganized the package into
gitlytics.core, gitlytics.io, gitlytics.automation, gitlytics.api, and gitlytics.cli (with backwards-compatible shims and centralized exceptions).
- Local-Mode Dashboard Bundle: Shipped an optimized local-mode React build with cloud-only chunks excluded and PDF export vendors split for faster loading.
- Zero-Warning Test & Build Pipeline: Migrated dev test client dependencies to
httpx2, formatted the codebase with Ruff, and updated README.md and SECURITY.md.
Security & Reliability Hardening
- Dashboard Bind & Token Safety:
gitlytics dashboard now requires --public-bind for all non-loopback hosts (0.0.0.0, ::, LAN IPs) while preserving explicit --host values when --public-bind is set.
gitlytics dashboard no longer silently promotes ambient GITHUB_TOKEN from the shell environment into the local web server.
- Principal & Privacy Isolation:
- Scoped
GITLYTICS_DATA_DIR CSV archives in POST /api/traffic to the authenticated token owner and surfaced TokenExpiredError as HTTP 401.
- Added
is:public filtering to public repository search lookups (GET/POST /api/username) and dropped all historical rows of private repositories when export_public_only=True.
- API & Upload Protections:
- Enforced
GITLYTICS_UPLOAD_KEY checks before Origin/Referer verification on POST /api/upload-csv.
- Added trusted
Host allowlist checks (127.0.0.1, localhost, ::1, or GITLYTICS_ALLOWED_HOSTS), unconditional application/json validation on browser POST routes, and blocked /_headers and dotfiles in the SPA fallback.
- Stream-capped multipart upload bodies (5 MiB) before form parsing and enforced CSV limits (50,000 rows, 2,000 unique repositories).
- Core Client & Validation:
- Validated
owner/repo identifiers before URL interpolation in get_deep_repo_stats() and get_repo_traffic().
- Replaced the global operation deadline with a
ContextVar so concurrent threads cannot poison retry budgets.
CI & Release Supply Chain
- Cross-Platform Python 3.11–3.14 Matrix: Added dedicated CI workflows across Linux, Windows, and macOS (
linux.yml, windows.yml, macos.yml), packaging/base-install verification (packaging.yml), Ruff + pip-audit checks (lint-security.yml), and Dependabot (dependabot.yml).
- Hardened OIDC PyPI Publishing: Isolated
publish.yml so builds and tests run in an unprivileged job and only the verified artifact is promoted for attested PyPI Trusted Publishing.
Installation
pip install --upgrade gitlytics
# Or with the local web dashboard:
pip install --upgrade "gitlytics[dashboard]"