#14

fix(deps): patch glib VariantStrIter unsoundness (RUSTSEC-2024-0429)

OpenJustMarkDevwants to merge intofrom

Fixes Dependabot alert #2 (glib 0.18.5, GHSA-wrw7-89jp-8q8g).

glib 0.18.5 is pulled in by Tauri's Linux GTK3 stack (tauri → muda/gtk 0.18 → glib ^0.18). The fix only exists in glib ≥ 0.20, upstream never backported it to 0.18, and gtk 0.18 can't use 0.20, so a normal update isn't possible. This app ships a Linux AppImage, so the patch matters here.

What this does

  • Vendors the published glib 0.18.5 crate under src-tauri/patches/glib
  • Applies the upstream fix: let mut p / &mut p in VariantStrIter::impl_get (the only change vs. the published crate)
  • Wires it in with [patch.crates-io]; Cargo.lock now treats glib as a local path package
  • src-tauri/patches/README.md documents the origin and when to remove it (once Tauri leaves gtk3-rs 0.18)

cargo check, clippy -D warnings, cargo fmt --check and cargo test pass locally on macOS. The Linux CI job is what compiles glib itself.

Note: cargo audit matches advisories by name and version, so it will still list RUSTSEC-2024-0429 as an allowed warning.

🤖 Generated with Claude Code

Activity

3
github-actions[bot]1mo ago

Review · c0b7f4b

✅ No blocking issues

Vendors glib 0.18.5 under src-tauri/patches/glib with the upstream RUSTSEC-2024-0429 VariantStrIter fix (let mut p / &mut p) wired via [patch.crates-io]. The single biggest risk is the 53k-line vendored copy drifting from upstream without automated verification.

Confidence: 4/5 — The fix and patch wiring match the advisory, but Linux CI (which actually compiles glib) was still in progress so the build is unconfirmed.