Skip to content

chore(deps): clear the RustSec advisories failing cargo-audit and cargo-deny - #8

Open
gitfromwildan wants to merge 4 commits into
rustasea:masterfrom
gitfromwildan:fix/rustsec-advisories
Open

gitfromwildan wants to merge 4 commits into
rustasea:masterfrom
gitfromwildan:fix/rustsec-advisories

Conversation

@gitfromwildan

@gitfromwildan gitfromwildan commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

cargo-audit and cargo-deny fail on master: 28 RustSec vulnerability findings, two unsound notices, two unmaintained notices, and one yanked crate have accumulated since the last green run. This PR clears them. It is based on master and does not depend on #7.

27 of the 28 findings are fixed by upgrading. The last one cannot be upgraded away under the current MSRV, so it is recorded as an exception together with the two unmaintained notices. Those three exceptions are a risk decision and need your call (see "Exceptions").

Changes

Commit Effect
chore(deps): update the lockfile for patched and un-yanked dependencies Lockfile only. Compatible updates for crypto-bigint 0.7, ctutils, quinn-proto, quinn-udp, rustls-webpki, webpki-roots, webpki-root-certs, tokio, and rustix; clipboard-win 5.4.1 (yanked) becomes 5.4.3.
chore(deps): bump calamine to 0.38 and rust_xlsxwriter to 0.102 Both resolve to zip 9.7, replacing the two older zip lines that carried eight advisories. No code change in rustasea-excel.
chore(deps): bump jsonwebtoken to 12 and p256 to 0.14 Removes crypto-bigint 0.5, which has no patched release. Adapts the JWT guard and the passkey tests to the new APIs.
chore(deny): document the advisory exceptions that cannot be upgraded away deny.toml, .cargo/audit.toml, and SECURITY.md.

The advisory ids each commit clears are in its message.

Behaviour change

EncodingKey::from_secret and DecodingKey::from_secret return a Result in jsonwebtoken 12. A secret the constructor rejects now surfaces as AuthError::Token when signing and AuthError::InvalidToken when verifying. No public RustaSea signature changes.

Exceptions

Advisory Crate Why it is not upgraded
RUSTSEC-2026-0459 libsqlite3-sys 0.30 (bundled SQLite, CVE-2026-119375) sqlx 0.8 pins libsqlite3-sys 0.30. The first sqlx line on a patched binding, 0.9, declares rust-version = 1.94, above the workspace MSRV of 1.88 (ADR-0001). Per the advisory, only a process that opens a database file, with its -wal, written by a less trusted party is exposed.
RUSTSEC-2026-0543, RUSTSEC-2026-0555 chrono, chrono-tz Flagged unmaintained, not vulnerable. Both are used across the workspace and through sqlx's chrono feature, so replacing them is a migration, not a bump.
RUSTSEC-2023-0071 (existing) rsa 0.9 Kept, with its reason corrected. rsa 0.10 is patched and jsonwebtoken 12 and russh now use it; 0.9 remains only through sqlx-mysql and a test-only dev-dependency of rustasea-google.

The alternative to the first exception is raising the MSRV to 1.94 and moving to sqlx 0.9, which also drops the rsa exception. That is a larger change than this PR and an ADR decision, so I left it out.

Testing

Run on rustc 1.100.0, the toolchain CI resolves stable to:

  • cargo audit and cargo deny check (0.21.0) pass: advisories, bans, licenses, and sources all ok.
  • cargo test --workspace --no-fail-fast passes: 186 suites. The two suites that compile generated code were rerun on their own after I completed my local crate cache; they resolve offline and first failed on a crate I had not downloaded.
  • That includes the two suites that failed in CI on master and on feat: database user provider, persisted sync failures, Gemini/Bedrock, and a docs sync #7, generated_module_compiles_in_workspace and generated_app_compiles_for_every_variant. Both compile a generated project offline, so they can only use the crates cargo fetch downloaded for the lockfile, and the lockfile pinned the yanked clipboard-win 5.4.1. With 5.4.3 in the lockfile they pass; the cargo test step is green in this PR's CI run.
  • No dependency that this PR adds or updates needs a rustc above 1.88; the set of crates above 1.88 is the same opt-in set as on master.

What stays red on this PR

Two failures are already on master and are fixed in #7, not here:

  • Format, lint & cycles: a clippy 1.100 needless_bool lint in crates/rustasea-validation/src/context.rs, and rustasea-storage --features sftp not compiling against russh 0.65.
  • Test (workspace): its second step, cargo test -p rustasea-storage --features aws,sftp, hits the same compile error.

To check that nothing else is hidden behind them, I applied this diff on top of #7 and ran cargo xtask ci there: it passes.

Not verified

  • MSRV. cargo +1.88.0 check was not run locally; the dependency rust-version check above is the only evidence until the CI job reports.
  • rustasea-storage with sftp on this branch, for the reason above.

@vheins, could you review this, in particular the three exceptions?

Semver-compatible updates that clear RustSec advisories failing cargo-audit and
cargo-deny: crypto-bigint 0.7 (RUSTSEC-2026-0387), ctutils (RUSTSEC-2026-0385),
quinn-proto (RUSTSEC-2026-0338, -0340, -0343, -0523, -0524), quinn-udp
(RUSTSEC-2026-0538), rustls-webpki (RUSTSEC-2026-0382), webpki-roots and
webpki-root-certs (RUSTSEC-2026-0381, -0383), and the unsound notices for tokio
(RUSTSEC-2026-0386) and rustix (RUSTSEC-2026-0486).

clipboard-win 5.4.1 was yanked; 5.4.3 replaces it.
Both now resolve to zip 9.7, which clears the zip extraction advisories
(RUSTSEC-2026-0367, -0368, -0369, -0429, -0545, -0546, -0547, -0548) that the
two older zip lines carried, and RUSTSEC-2026-0436 in calamine itself. No code
change is needed in rustasea-excel.
jsonwebtoken 10 and p256 0.13 pulled elliptic-curve 0.13 and with it
crypto-bigint 0.5, which has no patched release for RUSTSEC-2026-0387. The new
lines resolve to crypto-bigint 0.7.

API changes this absorbs:
- EncodingKey::from_secret and DecodingKey::from_secret now return a Result. A
  secret the constructor rejects surfaces as AuthError::Token when signing and
  AuthError::InvalidToken when verifying.
- The passkey tests build their signing key from fixed bytes instead of
  SigningKey::random, whose RNG bound changed, and use to_sec1_point.

rustasea-google keeps its test-only rsa 0.9 dev-dependency: 0.9 is still in the
lock through sqlx-mysql, and 0.10 needs a different RNG.
… away

- RUSTSEC-2026-0459 (SQLite bundled by libsqlite3-sys): sqlx 0.8 pins
  libsqlite3-sys 0.30 and sqlx 0.9 declares rust-version 1.94, above the
  workspace MSRV of 1.88. Exposure needs an untrusted database file opened
  together with its -wal.
- RUSTSEC-2026-0543 and RUSTSEC-2026-0555: chrono and chrono-tz are flagged
  unmaintained, not vulnerable. Replacing them is a migration of its own.
- RUSTSEC-2023-0071 stays, with its reason corrected: rsa 0.10 is patched and
  the 0.9 line now remains only through sqlx-mysql and a test dependency.

SECURITY.md lists the same exceptions.
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.

1 participant