Semi-automated package updating mechanism via pacman for dependencies which want or need bleeding edge updates from repo/source.
Find a file
Austin Schaefer f55188e36f
All checks were successful
CI / build (pull_request) Successful in 51s
CI / test (pull_request) Successful in 3m35s
CI / audit (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 6m57s
Fix issues from code review: shell-escaping gap, exit code, and more
A single-agent code review of this branch's diff (builder/pipeline/
publisher/sanity/hash + main/config/fetcher/state/verifier changes)
found six real issues, all fixed here:

- builder.rs: validate_shell_safe only rejected a literal single quote
  and newline, written for the single-quoted PKGBUILD fields. But
  asset_name (via install_source) and binary_name land in the install()
  line, which is necessarily double-quoted so ${srcdir}/${pkgdir} can
  expand — where $, backtick, and backslash are still live. Not
  currently exploitable (the one variable component, version, is already
  independently constrained by validate_pkgver's strict charset), but a
  latent gap relying on that coincidence rather than the validator
  actually covering its real use context. Widened the reject-list to
  cover both quoting styles, added regression tests including one at the
  generate_pkgbuild level. Corrected SPEC.md's "single-quoted" claim to
  match.
- pipeline.rs: a verification failure returned Ok(()) from
  process_package, so run_check never counted it as a failure and the
  process exited 0 even on a failed cryptographic/attestation check —
  exactly the event a monitoring setup (systemd OnFailure=, cron
  mail-on-error) most needs a non-zero exit to catch. Now bails, which
  run_check already treats as a package failure. Added an integration
  test against a mocked GitHub server exercising this exact path.
- builder.rs: find_built_package hardcoded the .pkg.tar.zst suffix, so a
  box with a different PKGEXT in makepkg.conf would report a false
  "makepkg failed" for a build that actually succeeded. Widened to match
  any .pkg.tar.* compression. Added direct unit tests (it had none).
- pipeline.rs: a newer tier 4-6 version silently overwrote a still-
  unreviewed older pending version with no indication anything was
  superseded. Now says so explicitly.
- hash.rs: builder/verifier each read a whole downloaded artifact into
  memory via std::fs::read just to hash it, doubling peak memory for no
  reason since the file's already on disk. Added sha256_hex_file,
  streamed in fixed-size chunks; both callers switched to it.
- Deduplicated two near-identical test-only "write an executable shell
  script" helpers (publisher.rs, sanity.rs) into a shared
  src/test_support.rs.

75 tests (was 63), cargo make ci clean. Re-verified end to end against
the real astral-sh/uv release after all six fixes — build, sanity check,
and publish into a scratch repo all still succeed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 12:06:40 +02:00
.forgejo/workflows Add ARCHITECTURE.md and apply it to this PR's code 2026-09-17 11:42:18 +02:00
.githooks Set up project tooling to match the rest of ~/dev's Rust fleet 2026-09-11 10:13:29 +02:00
packages.d Close the loop: build, sanity-check, and publish for the first time 2026-09-17 11:13:13 +02:00
src Fix issues from code review: shell-escaping gap, exit code, and more 2026-09-17 12:06:40 +02:00
.gitignore First working iteration: check -> fetch -> verify for a real package 2026-09-11 10:04:48 +02:00
ARCHITECTURE.md Add ARCHITECTURE.md and apply it to this PR's code 2026-09-17 11:42:18 +02:00
Cargo.lock Add shift-left quality gates: cognitive complexity, coverage, dependency fix 2026-09-17 09:16:14 +02:00
Cargo.toml Add shift-left quality gates: cognitive complexity, coverage, dependency fix 2026-09-17 09:16:14 +02:00
clippy.toml Add shift-left quality gates: cognitive complexity, coverage, dependency fix 2026-09-17 09:16:14 +02:00
Makefile.toml Add ARCHITECTURE.md and apply it to this PR's code 2026-09-17 11:42:18 +02:00
SPEC.md Fix issues from code review: shell-escaping gap, exit code, and more 2026-09-17 12:06:40 +02:00