Skip to content

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

Merged
vheins merged 7 commits into
rustasea:masterfrom
gitfromwildan:fix/rustsec-advisories
Nov 18, 2026
Merged

vheins merged 7 commits into
rustasea:masterfrom
gitfromwildan:fix/rustsec-advisories

Conversation

@gitfromwildan

@gitfromwildan gitfromwildan commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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.
@vheins

vheins commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Dependency/security review: approve with nits

Decision: APPROVE_WITH_NITS. The diff is correct and the advisory work checks out. Do not merge until CI is green.

Verified

  • cargo-audit, cargo-deny and MSRV (1.88.0) are green on this head, so "no dep above 1.88" is CI-verified.
  • cargo test --workspace --no-fail-fast passes. The red mark is step 2, -p rustasea-storage --features aws,sftp, failing on check_server_key / PublicKeyOrCertificate. The same error is on master (eb52d94a, run 41845577), so it is pre-existing.
  • needless_bool is crates/rustasea-validation/src/context.rs:162, untouched here, and only appears under clippy 1.100.
  • from_secret rejects only an empty secret (jsonwebtoken 12), and JwtConfig::validate() already rejects empty/<32-byte secrets before every entry point. The new Result arms are unreachable in normal operation: no runtime behaviour change, no weakened validation.
  • rsa 0.9 is genuinely limited to the opt-in mysql feature and a test-only dev-dep; sqlx-mysql uses RsaPublicKey::encrypt, not the vulnerable private-key path.
  • calamine 0.38 closes a reachable CFB/OLE2 DoS on user-supplied .xls/.xlsb. Good catch.

Risk decisions to confirm

  1. RUSTSEC-2026-0459: defensible, but the rationale is incomplete. Bundled SQLite is not optional here: activitylog, authlog and search default to sqlite, so the vulnerable copy is in the default build. sqlx 0.8.6 also has sqlite-unbundled, and the advisory states a system-SQLite build is unaffected. Your only stated alternative is MSRV 1.94 + sqlx 0.9. Please record why sqlite-unbundled was rejected (system libsqlite3, bindgen/libclang, cross-compile cost). Residual risk: LOW for app-owned DBs, MEDIUM for downstream users opening untrusted DB+-wal pairs.
  2. RUSTSEC-2023-0071 / 0543 / 0555: reasons accurate, accept as written.

Nits

  • SECURITY.md:101-106 says exceptions are mirrored in .cargo/audit.toml; only 2023-0071 and 0459 are there.
  • deny.toml:18 still says cargo-deny 0.20; CI uses 0.21.0.
  • ADR-0001 still records jsonwebtoken 10; add a superseding note for 12.
  • Add one test pinning the new Token / InvalidToken mapping (currently unreachable and untested).

Merge

#7 edits the identical clipboard-win lock lines, and both sides make the same change, so the 3-way merge is clean either order. Land the two one-line CI fixes (or #7) first, rebase, re-run CI.

- Clarify RUSTSEC-2026-0459 exposure (bundled sqlite is compiled by default),
  record the rejected `sqlite-unbundled` path, fix the cargo-deny version
  reference, and state which exceptions are mirrored in .cargo/audit.toml.
- Add a unit test asserting an empty HMAC secret maps sign() to
  AuthError::Token and decode_claims() to AuthError::InvalidToken.
- Fix five RustSec advisories in lettre
  RUSTSEC-2026-0560, RUSTSEC-2026-0561, RUSTSEC-2026-0562, RUSTSEC-2026-0564,
  RUSTSEC-2026-0565 are all resolved by lettre >= 0.11.24. The workspace
  requirement ^0.11.23 already admits it, so only the lockfile pin changes;
  lettre's dependency list is unchanged.
@vheins
vheins merged commit 8153ed8 into rustasea:master Nov 18, 2026
5 of 6 checks 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