Repository navigation
Conversation
added 2 commits
November 14, 2026 20:39
sqlx 0.9 requires SqlSafeStr for query strings. Static migration arrays now iterate by value (&'static str); webhook SQL is literal; the pragma_table_info column check is fully bound. The remaining dynamic sites interpolate only compile-time column lists, '?' placeholders, fixed identifiers, or DDL read from this database's sqlite_master, and are marked AssertSqlSafe with that justification. Features are pinned to sqlite-bundled + sqlite-unlock-notify, matching the 0.8 libsqlite3-sys feature set (0.9's 'sqlite' would add deserialize and load-extension). sqlx 0.9.0 still caps libsqlite3-sys < 0.38, so RUSTSEC-2026-0459 is not fixed by this commit.
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
This PR upgrades
sqlxfrom 0.8.6 to 0.9.0.The RUSTSEC-2026-0459 exemption stays. sqlx 0.9.0 is the only 0.9 release on crates.io, and its
sqlx-sqlitedeclareslibsqlite3-sys >=0.30.1, <0.38.0. The lockfile therefore stays onlibsqlite3-sys0.30.1, which bundles SQLite 3.46. The fix needs 0.39 (SQLite 3.54). The wider<0.40bound is already on sqlx main (transact-rs/sqlx#4502) and ships in 0.9.1 (transact-rs/sqlx#4517, not yet released). Theaudit.ymlcomment now says to remove the ignore with sqlx 0.9.1. The owner chose this option over pinning sqlx to an unreleased git revision.Migration
sqliteis replaced bysqlite-bundled+sqlite-unlock-notify. In 0.9,sqlitealso enablesdeserializeandload-extension, so this keeps exactly thelibsqlite3-sysfeature set we had under 0.8 (bundled,unlock_notify,pkg-config,vcpkg).rsa,pkcs1andnum-bigint-digdrop out ofCargo.lockentirely, because sqlx-mysql 0.9 no longer pulls them in.atomic-polyfillis also absent. TheRUSTSEC-2023-0071andRUSTSEC-2023-0089ignores are probably unnecessary now; I left them as they are.whoami1 → 2,md-5/sha1/sha20.11, andhashlink/flumebumps, all transitive through sqlx.SqlSafeStr audit (45 sites)
sqlx 0.9 only accepts query strings that are
&'static stror explicitly marked as audited (AssertSqlSafe). Each of the 45 compile errors was reviewed:db.rs,db/bootstrap.rs): these now iterate by value, so each query is a&'static strand needs no assertion.api/auth.rs): the strings were already literals, so the.to_string()calls were dropped and they compile as&'static str.db/bootstrap.rs): thepragma_table_infoquery used to interpolate the table and column names. It now binds them as parameters (pragma_table_info(?) WHERE name = ?).AssertSqlSafewith a comment explaining why each is safe:MERCHANT_COLS/PL_COLUMNS/PRICE_COLS/SUB_COLScolumn-list formats: compile-time constants only.column = ?fragments, and every value is bound.IN (?,…): only placeholders are interpolated.ALTER TABLE … ADD COLUMN: identifiers come from a fixed list.PRAGMA table_info(…):ensure_columnsnow takes&'static str.sqlite_master.No request-derived value is interpolated into SQL anywhere.
Behaviour differences
BEGIN IMMEDIATEtransactions.BEGIN, sqlx now rolls it back correctly.Pool::closenow closes all connections before it returns.Verification
cargo test --locked: 136 passed. The 3 ignored tests need external fixtures and were already ignored. The repair tests, migration tests and the referral-guardrail migration test all pass.python3 scripts/check-dependency-exposure.py: passes unchanged.cargo audit --deny unmaintained --deny unsound --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2023-0089 --ignore RUSTSEC-2026-0459: passes. Without the 0459 ignore it fails, as expected, onlibsqlite3-sys0.30.1.Not deployed.