Skip to content

fix(deps): update bundled SQLite for RUSTSEC-2026-0459 - #408

Merged
alinejun merged 2 commits into
Actrium:mainfrom
alinejun:codex/fix-sqlite-audit
Nov 9, 2026
Merged

alinejun merged 2 commits into
Actrium:mainfrom
alinejun:codex/fix-sqlite-audit

Conversation

@alinejun

@alinejun alinejun commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Dependency Audit is blocked by RUSTSEC-2026-0459 in bundled SQLite. The workspace and four downstream lockfiles now resolve one libsqlite3-sys 0.39.1, bundling SQLite 3.54.1.

Changes

  • Upgrade rusqlite to 0.41.1 and consolidate CLI/sync dependencies on the workspace declaration, preserving statement caching and checked unsigned integer conversions.
  • Use SQLx 0.9.0 pinned to official upstream commit 10462fa4414c6c7f1ed1d39bb31678e3b726878c (SQLx #4502). The published release excludes the patched SQLite version; replace this pin once a release includes the fix.
  • Adapt SQLx query-safety APIs with static SQL, bound fixture values, and integer-only PRAGMA builders. Update Tokio/Rustls feature declarations and all five affected lockfiles.

Related CI blockers: #404, #406.

Validation

  • cargo audit --json: 0 vulnerabilities under the existing repository policy; four existing warnings remain and the audit exceptions are unchanged.
  • cargo fmt, cargo fmt --all --check, language policy, and git diff --check: passed.
  • cargo clippy --fix --lib --bins --all-targets --allow-dirty --locked for loran-signer, loran-platform, loran-issuer, loran-publisher-registry, and loran-server: passed.
  • Signer Clippy with --all-features: passed, including PostgreSQL backend compilation.
  • Locked Cargo metadata resolves for all five workspaces.
Executed tests Passed
Mailbox, sync, admin, issuer, platform, publisher registry, signer library suites 327
Native platform 14
Hyper storage, including reopen persistence 8
Issuer Realm Profile integration 16
Fullstack registration/discovery and unregister durability across restart 2
Total 367

One existing admin library test remains ignored.

Resolve RUSTSEC-2026-0459 with rusqlite 0.41.1 and libsqlite3-sys 0.39.1. Pin SQLx to the official upstream commit that accepts the patched SQLite line, preserve native storage features, and refresh all five affected lockfiles.

Adapt SQLx query-safety APIs with static statements, bound fixture data, and integer-only PRAGMA builders.

Constraint: Keep rusqlite and SQLx on one patched sqlite3 library
Confidence: high
Scope-risk: moderate
@alinejun
alinejun requested a review from kaito-harry November 9, 2026 11:06
kaito-harry
kaito-harry previously approved these changes Nov 9, 2026

@kaito-harry kaito-harry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues were found in the completed single-session review.

Shared validation: passed. Rust formatting and compilation passed.

rusqlite 0.41 changed Statement::column_names() from &[&str] to
impl Iterator<Item = &str>, so the follow-up .into_iter() is a useless
conversion and fails CI (-D warnings).

Verified locally:
  cargo clippy -p actrium-sync-server --lib --locked -- -D warnings
  cargo test  -p actrium-sync-server --lib --locked
@alinejun

alinejun commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a clippy fix commit + an empty retrigger commit, but GitHub still reports head = 4a22305 while the fork branch is at 2ab742e8. Trying to refresh.

@alinejun

alinejun commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@kaito-harry 之前的 approve 被新 commit dismiss 了,麻烦重新 approve 一下 🙏

新 commit 说明:

  • 1624826fa fix(sync): drop redundant into_iter after rusqlite 0.41 upgrade
  • 只是删除一行冗余的 .into_iter()(rusqlite 0.41 后 column_names() 已返回 iterator),修复 CI Rust job 的 clippy::useless_conversion 报错
  • 本地已验证:cargo clippy -p actrium-sync-server --lib --locked -- -D warnings 通过,cargo test -p actrium-sync-server --lib --locked 6/6 通过

@alinejun
alinejun requested a review from kaito-harry November 9, 2026 13:15

@kaito-harry kaito-harry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues were found in the completed single-session review.

Shared validation: passed. Rust formatting and compilation passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants