Skip to content

fix(deps): crypto/archive majors — chacha 0.11, dalek 3.x, zip 8.x; --all-features builds again - #561

Queued
runyourempire wants to merge 8 commits into
mainfrom
fix/deps-crypto-archive-majors
Queued

fix(deps): crypto/archive majors — chacha 0.11, dalek 3.x, zip 8.x; --all-features builds again#561
runyourempire wants to merge 8 commits into
mainfrom
fix/deps-crypto-archive-majors

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

Lands the stuck security-relevant major-version dependency migrations that Dependabot could not do mechanically, and proves --all-features stays green. One squash commit; NOTICE regenerated in the same commit.

Verified starting point (differs from the audit brief)

The brief said --all-features was broken with 44 chacha20poly1305 0.11 errors in team_sync_crypto.rs. Verified false at base 6dd1e218: cargo check --all-features passes there — the chacha 0.11 migration (manifest, Generate trait, XNonce::generate(), XNonce::try_from) already landed on main earlier, as did sha2 = "0.11" (making #455's direct-dep bump already satisfied). This PR therefore contains no chacha changes; it keeps that leg green while landing the two majors that were genuinely stuck.

What this PR migrates

ed25519-dalek 2.2.0 → 3.0.0 (app + relay)

  • Pulls curve25519-dalek 4.1.3 → 5.0.0, ed25519 2.2.3 → 3.0.0, fiat-crypto 0.3.
  • Every call site is from_bytes / Signer / Verifierzero source changes compiled clean in both crates.
  • Dropped the v2 rand_core feature from the app manifest: it only gated RNG-backed key generation, which no call site uses (grep-verified: no SigningKey::generate anywhere).
  • Proof the primitives still behave: license verification tests validate the one real production-signed key against the production public key; engine_runs sign→verify→forge→replay roundtrips; relay mint/verify tests — all green, all unchanged.

x25519-dalek 2.0.1 → 3.0.0

  • One call site changed: TeamCrypto::generate() now uses StaticSecret::random() (crate getrandom feature) instead of v2's random_from_rng(rand 0.8 OsRng), because v3 left the rand_core 0.6 generation behind. Same system CSPRNG, mechanical API swap — no algorithm or parameter change.
  • DH/HKDF/AEAD paths untouched; roundtrip tests (shared-key agreement, admin→member team-key distribution, tamper rejection, nonce uniqueness) green under --features team-sync.

zip 0.6.6 → 8.6.0

  • Call sites: extractors/archive.rs, extractors/office.rs, osv/cache.rs, embeddings_providers/fastembed.rs. Actual code delta was small: 5× FileOptionsSimpleFileOptions, one test-helper compression_level param i32i64. Readers (ZipArchive/by_index/enclosed_name) compiled unchanged. No follow-up split needed.
  • Tree effect: unifies on the zip 8.6.0 already in-tree via calamine 0.36 / docx-rs 0.4.22 (3 zip versions → 2; the remaining 4.6.1 is pinned by tauri-plugin-updater).
  • Supply-chain wins: removes bzip2-sys (C libbz2) in favour of libbz2-rs-sys (pure Rust); retires old aes 0.7 / sha1 0.10 / pbkdf2 0.11 / constant_time_eq 0.1 / zstd 0.11 pins. Default features kept so archive read-support is a superset of 0.6 (user ZIPs with bzip2/zstd/aes entries still extract; deflate64/lzma/ppmd added).
  • Decompression-bomb guards re-proven by the existing fixture tests (lying-size entry, ratio bomb, entry-count bomb) — all green on zip 8.
  • deny.toml: added bzip2-1.0.6 (the libbz2-rs-sys licence, BSD-style attribution-only) to the allow list so the nightly cargo-deny audit cannot trip on it.

Deliberately not taken

  • relay sha2 0.10 stays — out of this PR's scope (server-side crate, no advisory driving it).
  • No dalek sub-migration had to be abandoned: no rand_core unification conflicts materialized (the getrandom-backed constructors sidestep rand generations entirely).

Gates (all local, all green)

  • cargo check --all-features --all-targets — clean, zero warnings
  • cargo test --lib 4712 pass · cargo test --lib --features team-sync 4764 pass · relay 28 pass
  • cargo clippy -- -D warnings on all five CI matrix legs (none / experimental / team-sync / enterprise / team-sync,enterprise) plus --all-features
  • cargo deny check bans / licenses / sources / advisories — ok
  • cargo fmt --check, node scripts/check-file-sizes.cjs, generate-notice.cjs --check — ok
  • Rebased onto cd360fe3; the two commits main gained since base touch scoring/LLM files only — no overlap.

After this merges — Dependabot PRs to close (not closed by me)

Coordination note

verax coordinate holds a claim on src-tauri/Cargo.toml for worktree fix+interruption-gate; inspected that worktree directly — its only manifest delta is one windows-sys features line (172), zero overlap with the dep lines changed here. All other touched files were claimed by this lane.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LrXvdHoDGUj99Fqf1fCYJY

…res stays green

ed25519-dalek 2.2.0 -> 3.0.0 (app + relay), x25519-dalek 2.0.1 -> 3.0.0,
zip 0.6.6 -> 8.6.0. The chacha20poly1305 0.11 migration was found already
landed on main (cargo check --all-features passes at the base commit); this
change keeps it green while landing the remaining stuck majors Dependabot
could not migrate (#457, #286, #521).

- x25519: StaticSecret::random() (getrandom) replaces random_from_rng(rand
  0.8 OsRng) — same system CSPRNG, mechanical API swap, no algorithm change.
- ed25519: all call sites are from_bytes/sign/verify; compiled unchanged.
  Dropped the unused v2 rand_core feature. Relay: zero source changes.
- zip: FileOptions -> SimpleFileOptions (5 sites), compression_level i64.
  Unifies on the zip 8.6.0 already in-tree via calamine/docx-rs; removes
  zip 0.6.6 and bzip2-sys (C) in favour of libbz2-rs-sys (pure Rust).
- deny.toml: allow bzip2-1.0.6 (libbz2-rs-sys licence). NOTICE regenerated
  in this commit.

Gates: check --all-features --all-targets clean; test --lib 4712 pass and
--features team-sync 4764 pass; clippy -D warnings on all five CI legs plus
--all-features; relay tests 28 pass; cargo deny bans/licenses/sources/
advisories ok; fmt; file sizes.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LrXvdHoDGUj99Fqf1fCYJY
@runyourempire
runyourempire enabled auto-merge (squash) August 31, 2026 01:46
@runyourempire
runyourempire disabled auto-merge August 31, 2026 07:36
@runyourempire
runyourempire added this pull request to the merge queue Aug 31, 2026
Any commits made after this event will not be merged.
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