fix(deps): drop lru 0.7.8 from reed-solomon-erasure (RUSTSEC-2026-0253) - #29
fix(deps): drop lru 0.7.8 from reed-solomon-erasure (RUSTSEC-2026-0253)#29dirvine wants to merge 2 commits into
Conversation
Latest published reed-solomon-erasure (6.0.0) still depends on lru 0.7.8, which is RUSTSEC-2026-0253 (patched only in lru >= 0.18.2). Vendor 6.0.0 via [patch.crates-io] with lru bumped to 0.18.2 so the lockfile has no vulnerable lru. Do not ignore 0253. Co-authored-by: David Irvine <dirvine@users.noreply.github.com>
Vendored reed-solomon-erasure sources are upstream MIT and should not be rewritten. Skip */third_party/* in the License Compliance find. Co-authored-by: David Irvine <dirvine@users.noreply.github.com>
ReviewClean, well-scoped fix. This vendors Verified:
Minor suggestions (non-blocking):
No security, correctness, or test-coverage concerns beyond the above. The |
| # on lru 0.7.8 (RUSTSEC-2026-0253, patched only in lru >= 0.18.2). No upstream | ||
| # upgrade exists. This path crate is 6.0.0 plus the lru 0.18.2 bump. | ||
| [patch.crates-io] | ||
| reed-solomon-erasure = { path = "third_party/reed-solomon-erasure" } |
There was a problem hiding this comment.
Published crate bypasses security patch
When a downstream application installs the published communitas-core crate, the workspace-root [patch.crates-io] entry is not included in that package, so Cargo resolves the crates.io reed-solomon-erasure 6.0.0 release and restores its vulnerable lru 0.7.8 dependency. How this was verified: The published crate manifest still declares reed-solomon-erasure = "6.0.0", while the replacement exists only in the workspace root.
Prompt To Fix With AI
This is a comment left during a code review.
Path: Cargo.toml
Line: 80-83
Comment:
**Published crate bypasses security patch**
When a downstream application installs the published `communitas-core` crate, the workspace-root `[patch.crates-io]` entry is not included in that package, so Cargo resolves the crates.io `reed-solomon-erasure` 6.0.0 release and restores its vulnerable `lru` 0.7.8 dependency. **How this was verified:** The published crate manifest still declares `reed-solomon-erasure = "6.0.0"`, while the replacement exists only in the workspace root.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| )); | ||
|
|
||
| for a in $table.iter() { | ||
| table_str.push_str("["); |
There was a problem hiding this comment.
Vendored build script uses unwrap
The newly vendored production build script uses unwrap() here and at the generated-output and target-architecture operations on lines 123 and 165. These panic-based failure paths violate the repository rule requiring production Rust code to handle or propagate errors, producing opaque build failures when file operations or required environment state fail.
Context Used: CLAUDE.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: third_party/reed-solomon-erasure/build.rs
Line: 119
Comment:
**Vendored build script uses unwrap**
The newly vendored production build script uses `unwrap()` here and at the generated-output and target-architecture operations on lines 123 and 165. These panic-based failure paths violate the repository rule requiring production Rust code to handle or propagate errors, producing opaque build failures when file operations or required environment state fail.
**Context Used:** CLAUDE.md ([source](https://github.com/saorsa-labs/communitas/blob/main/CLAUDE.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Follow-up to #28. That squash-merge (
e974bb4) still leftlru0.7.8 onmainviareed-solomon-erasure6.0.0.This PR is only the vendor /
[patch.crates-io]commit cherry-picked onto currentorigin/main, plus a License Compliance exclude for the vendor tree. It does not replay #28.Why a vendor patch
Latest published
reed-solomon-erasureis still 6.0.0 and still depends onlru ^0.7.8. RUSTSEC-2026-0253 is patched only inlru >= 0.18.2. No upstream upgrade exists.Changes
[patch.crates-io]points atthird_party/reed-solomon-erasure(upstream 6.0.0 +lru0.18.2 +NonZeroUsizeforLruCache::new).Cargo.lockhas nolruversion< 0.18.2.*/third_party/*so upstream vendor sources are not rewritten.RUSTSEC-2026-0215ignore (yrs/smallstr) already onmain.Verify
Local result: advisories ok. Lockfile contains only
lru0.18.2.Refs:
Greptile Summary
The PR vendors reed-solomon-erasure 6.0.0 and applies a workspace override to replace vulnerable lru 0.7.8 with 0.18.2.
Confidence Score: 3/5
This PR should not merge until the published communitas-core artifact also delivers the lru remediation to downstream consumers.
Workspace builds use the safe vendored dependency, but publishing communitas-core drops the root patch and restores the vulnerable crates.io dependency chain for downstream applications.
Files Needing Attention: Cargo.toml, communitas-core/Cargo.toml, and third_party/reed-solomon-erasure/build.rs
Security Review
Published communitas-core consumers still resolve the crates.io reed-solomon-erasure 6.0.0 package and its vulnerable lru 0.7.8 dependency because workspace-root Cargo patches are not propagated into published crates.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Workspace build] --> B[Root patch.crates-io] B --> C[Vendored reed-solomon-erasure 6.0.0] C --> D[lru 0.18.2] E[Published communitas-core consumer] --> F[communitas-core manifest] F --> G[crates.io reed-solomon-erasure 6.0.0] G --> H[lru 0.7.8]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(deps): patch reed-solomon-erasure of..." | Re-trigger Greptile
Context used: