fix(deps): resolve 9 of 28 cargo-audit advisories (#204)#205
Merged
Conversation
Resolves 8 of 28 cargo-audit advisories (20 remaining): - Bump sqlx to 0.8.6 (exact pin): pulls in rustls 0.23.15 + rustls-webpki 0.103.x + rustls-pki-types, replacing the older rustls 0.21.12 + rustls-webpki 0.101.7 + rustls-pemfile chain used by sqlx 0.8.0. Resolves: - RUSTSEC-2026-0098 (rustls-webpki URI name constraints) - RUSTSEC-2026-0099 (rustls-webpki wildcard in name constraints) - RUSTSEC-2026-0104 (rustls-webpki reachable panic in CRL parsing) - RUSTSEC-2025-0134 (rustls-pemfile — replaced by rustls-pki-types) - RUSTSEC-2024-0363 (sqlx binary protocol cast) - Bump tauri to 2.11.5 (patch via cargo update, no Cargo.toml change). No advisories resolved by this specifically, but stays current. - Bump rusqlite to 0.32.1 (floor of ^0.32). Required to resolve libsqlite3-sys conflict: sqlx 0.8.6's sqlx-sqlite needs libsqlite3-sys ^0.30, our pinned rusqlite 0.31.0 used 0.28. Only one crate can link sqlite3. 0.32 series uses 0.30+ — matches. Verified: - cargo check --workspace: passes - cargo clippy --workspace -- -D warnings: passes - cargo audit: 20 advisories remaining (down from 28) Refs: #204
sqlx 0.9.0 enforces that all SQL strings passed to query() and raw_sql() implement the new SqlSafeStr trait. Only &'static str does so natively; dynamic strings built via format!() must be wrapped with AssertSqlSafe() to opt in after auditing for injection risk. This is a mechanical fix for the 10 callsites that failed to compile after the 0.8.6 → 0.9.0 bump. All dynamic parts are non-user-controlled: - manager.rs: charset comes from validated connection profile and is also passed to MySqlConnectOptions::charset() (same charset identifier set). - executor.rs: combined_sql uses the text protocol (raw_sql) by design — the database identifier is backtick-escaped; the rest is user SQL. - inspector.rs: database/table/view/routine/trigger identifiers come from INFORMATION_SCHEMA lookups or connection metadata and are wrapped in backticks before interpolation.
Resolves RUSTSEC-2023-0071 (rsa Marvin Attack) and unsticks the spin 0.9.8 yanked advisory: - sqlx 0.9 makes rsa opt-in behind the `mysql-rsa` feature (we don't use it), so rsa no longer appears in the tree - Newer num-bigint-dig transitively replaces spin 0.9.8 sqlx 0.9.0 also renames the runtime+tls combined feature: - old: runtime-tokio-rustls - new: runtime-tokio + tls-rustls-ring Code fix for SqlSafeStr enforcement (separate commit): wraps 10 dynamic SQL callsites with AssertSqlSafe since sqlx 0.9 now rejects dynamic strings by default. Resolved advisories: RUSTSEC-2023-0071, spin-yanked (in sub-deps). Advisories remaining: 19 (down from 20, all gtk-rs chain + others). Refs: #204
Adds scripts/cargo-audit-check.sh — a wrapper around `cargo audit` that fails ONLY on real vulnerabilities (cargo audit "vulnerabilities" list), not on unmaintained/yanked/unsound warnings (which are logged but don't block the build). Rationale: SQLPilot has 17 transitive advisories on the gtk-rs GTK3 chain (RUSTSEC-2024-0411..0420) + 1 unsound (glib 0.18.5, RUSTSEC-2024-0429) + 4 unic-* unmaintained sub-deps. None of these have upstream fixes: - gtk-rs GTK3 bindings: archived 2024-03-04, no maintained fork - Tauri 2.x has no GTK4 webview support (issues #7335, #12561-#12563 all open) - unic-* comes from tauri-utils → kuchikiki → phf_generator chain These are "unmaintained" / "unsound" warnings, not active exploits. We surface them in CI logs + GitHub Step Summary (not hidden) but don't fail the build. The script: - Runs `cargo audit --json`, parses with jq - Pretty-prints ALL advisories (visible, not hidden) - Counts vulnerabilities vs warnings - Writes a summary to $GITHUB_STEP_SUMMARY when running in CI - Exits 1 ONLY when vulnerabilities.list has entries - Exits 0 otherwise (regardless of warning count) Real vulnerabilities (RUSTSEC type "vulnerability") still fail CI. Current blocking set: 2 quick-xml (RUSTSEC-2026-0194/0195, blocked by wayland-scanner 0.31.10 not yet bumping to quick-xml ≥0.41). Refs: #204
Re-adds cargo-audit to PR CI as a non-silenced gate. Uses scripts/cargo-audit-check.sh which: - Fails ONLY on real vulnerabilities (RUSTSEC type "vulnerability") - Logs all unmaintained/yanked/unsound warnings to job output + summary - Uses zero --ignore flags Pre-existing 17 unfixable advisories (gtk-rs unmaintained chain + glib unsound + unic-* sub-deps) are now visible in every PR's CI output but don't fail the build. If/when upstream fixes ship, they'll resolve naturally on the next cargo update. Currently blocking: 2 quick-xml advisories (RUSTSEC-2026-0194/0195) blocked by wayland-scanner 0.31.10 constraint. Tracked in #204. Refs: #204
Script is at repo root, job runs from src-tauri working dir. Use $GITHUB_WORKSPACE for absolute path.
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves 9 of 28 cargo-audit advisories. The remaining 19 are blocked by upstream (gtk-rs GTK3 archived, Tauri 2.x no GTK4 webview, wayland-scanner's quick-xml pin) — re-added to CI as non-blocking warnings via wrapper script.
Advisories resolved (9)
Advisories remaining (19, all blocked by upstream)
wayland-scanner 0.31.10'squick-xml = "0.39"constraint. Need upstream bump in wayland-rs.Code changes
sqlx::AssertSqlSafefor sqlx 0.9's newSqlSafeStrenforcement. All are validated/sanitized inputs (connection charset, backtick-escaped identifiers) — subagent verified safety.cargo audit --jsonand exits 1 only on real vulnerabilities. Unmaintained/yanked/unsound warnings get logged to job output + GitHub Step Summary but don't fail. Zero--ignoreflags.CI change
.github/workflows/ci.yml: cargo-audit job re-added. Uses the wrapper script. Blocked on real vulnerabilities only.Verification
cargo check --workspace: passescargo clippy --workspace -- -D warnings: passescargo test --workspace --lib: passes (1488 + 5 unit tests)cargo audit: 19 advisories (down from 28), all visible via wrapper script outputTest impact for user review
cargo build --workspace) + launch app + click through core flows (connect, browse schema, run query, view results)Per-step commits
chore(ops): add plan doc for #204 cargo-audit fixfix(deps): bump sqlx 0.8.6 + tauri 2.11.5 + rusqlite 0.32.1fix(sqlx): wrap dynamic SQL strings with AssertSqlSafe for 0.9.0fix(deps): bump sqlx 0.8.6 -> 0.9.0feat(ci): add cargo-audit-check wrapper scriptci: re-add cargo-audit (via wrapper script)Follow-ups (separate work)
cargo update)Related
--ignoreworkaround, which was the wrong approach)🤖 Subagents used for: research (versions, breaking changes), code edits (AssertSqlSafe wrapping), wrapper script implementation. All reviewed + tested by team-lead.