]> quire.kejadlen.dev Git - quire.git/commit
Tighten post-receive hook based on review
authorAlpha Chen <alpha@kejadlen.dev>
Sun, 26 Apr 2026 22:26:33 +0000 (15:26 -0700)
committerAlpha Chen <alpha@kejadlen.dev>
Mon, 27 Apr 2026 01:34:37 +0000 (18:34 -0700)
commit08bf88a3ca3c8720667eba8bbdb773459da37fac
tree3f87db932ca4bba4e542ff6fefd7d43c481585cb
parent569def6c00b10dc3ccf1190067778e690e491019
Tighten post-receive hook based on review

Move the push out of the hook into Repo::push_to_mirror so the actual
push logic is unit-testable independent of GIT_DIR/stdin orchestration.
Reject mirror URLs that embed credentials at deserialization, since a
typo would leak the token via tracing or Sentry. Make terminal-stdin
invocation an error rather than a silent no-op — running the hook
manually is a misuse, not a state.

Documents the env-var token exposure (visible in /proc/<pid>/environ)
as a known limitation in the helper's docstring; revisit when the CI
runner lands. Updates README to describe the PAT approach instead of
the per-repo deploy key the original design called for.

Assisted-by: Claude Opus 4.7 via Claude Code
README.md
src/bin/quire/commands/hook.rs
src/quire.rs