CI / test (push) Canceled after 0s
Close two token-leak paths in the git mirror and harden the supply chain per the OWASP audit (audit/2026-08-11/security-report.md). Runtime fixes: - mirror GitError masks the embedded oauth2:<token> in both the failing command line and git's stderr before raising; cli now catches GitError with a clean message instead of an uncaught traceback that printed the live token. - Scrub token-bearing remote URLs from the bare config at the end of each run so tokens aren't persisted in .git/config. - Default mirror workdir is per-user 0700 (/tmp/cb2gitea-<uid>), not a world-readable /tmp/cb2gitea. Supply chain: - Commit uv.lock; CI installs via uv sync --frozen (hash-verified). - Pin Gitea Actions to commit SHAs, not mutable @vN tags. - Pin the ruff rule set and exclude audit/ for reproducible linting. Adds tests/test_mirror.py for the redaction helpers.
1.8 KiB
1.8 KiB
Changelog
All notable changes to this project will be documented in this file. The format is based on Common Changelog and this project adheres to Semantic Versioning.
[Unreleased]
security
- migrator: keep forge API tokens out of error text and on-disk git config. Git failures now surface a redacted
oauth2:***@URL instead of the live token, and the CLI catchesGitErrorwith a clean message instead of dumping a traceback. The mirror's remote URLs are scrubbed to bare form after each run (no token persisted in.git/config), and the default workdir is per-user0700(/tmp/cb2gitea-<uid>) so it isn't world-readable on shared hosts. - deps: reproducible, hash-verified installs — commit
uv.lockand install from it in CI (uv sync --frozen); pin Gitea Actions to commit SHAs instead of mutable@vNtags; pin the ruff rule set explicitly (select = ["E4","E7","E9","F"]) and excludeaudit/.
feat
- migrator: working Codeberg → Gitea migration via
codeberg-to-gitea migrate. Mirrors git (code, history, tags, LFS) and replays labels, milestones, issues & PRs (with comments), and releases (with assets) entity-by-entity over the shared Forgejo/Gitea REST API. Two-pass issue/PR creation with#NNN/URL cross-reference rewriting to the target's number space; deleted-branch PR heads recreated asrefs/heads/_pr/<n>. Tokens viaCODEBERG_TOKEN/GITEA_TOKEN;--repo owner/name(or bare name).--delete-existingfor clean re-runs.
chore
- project: bootstrap scaffold — Python package (
src/layout, hatchling, ruff, pytest), GPL-3.0-or-later license, Gitea Actions CI, CITATION.cff, README, ADRs, and DOX-structured AGENTS.md. - deps: add
httpx,typer; addcodeberg-to-giteaconsole script.