Repository navigation
Description
Problem
PR #70 (d7106e5) vendored glib 0.18.5 into vendor/glib-0.18.5-patched/ and routes the workspace through it with [patch.crates-io]. Its PROVENANCE.md claims the directory is the published crate source apart from a documented set of deltas — but nothing enforces that claim. It is verified only by hand, at review time.
This matters because the vendored crate is product code: it compiles into every Linux desktop build. An edit there ships, and the only thing standing between a silent change and a release is a reviewer noticing a diff inside a 53k-line directory.
Why now
The documented delta set already grew during review of #70, from two items to three:
PROVENANCE.md— the provenance record itself (new file)src/variant_iter.rs— the two-line RUSTSEC-2024-0429 backport (gtk-rs-core#1343)src/lib.rs— a crate-levelallow(warnings)reproducing Cargo's--cap-lints allowfor registry deps, added in763c1ad
That is exactly the drift an automated check exists to catch, and it happened within a single PR.
Proposal
Add a CI job that verifies the vendored tree against the published crate:
- Download the
glib0.18.5.cratetarball from crates.io. - Verify it against the checksum pinned in
PROVENANCE.md(233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5), which is also the checksumCargo.lockcarried before the[patch.crates-io]entry removed it. - Diff the extracted source against
vendor/glib-0.18.5-patched/. - Fail unless the only differences are the three documented deltas above.
.github/workflows/audit.yml already triggers on vendor/glib-0.18.5-patched/** (added in #70), so the path filter this needs is in place — though a fresh job or workflow may be a better home than the audit job, since this checks provenance rather than advisories.
Acceptance criteria
- An unauthorized edit to any file under
vendor/glib-0.18.5-patched/fails CI. - An edit to one of the three documented deltas fails CI unless
PROVENANCE.mdis updated in the same change. - The check pins the expected deltas somewhere a reviewer can read, rather than burying them in workflow YAML.
Removal condition
Same as the vendored directory itself: when Tauri's Linux stack adopts glib >= 0.20, this job, vendor/glib-0.18.5-patched/, the workspace exclude, the [patch.crates-io] entry, and the RUSTSEC-2024-0429 audit exception all go together.
Related
- fix(audit): address RustSec issues #53–#68 #70 — vendored the crate and backported the fix
- RUSTSEC-2024-0429: Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter#68 — RUSTSEC-2024-0429, the advisory being patched
Raised as a non-blocking follow-on during review of #70.
Activity