Repository navigation
build(deps): move RustSec-flagged dependencies to patched releases - #2046
Conversation
Lockfile-only, semver-compatible updates: - aws-lc-sys 0.45 (RUSTSEC-2026-0044..0048) - rustls 0.23.45 (RUSTSEC-2026-0285) - rustls-webpki 0.103.15 (RUSTSEC-2026-0049, 0098, 0099, 0104) - h2 0.4.20 (RUSTSEC-2026-0258) - crossbeam-epoch 0.9.21 (RUSTSEC-2026-0204) - quinn-proto 0.11.19 (RUSTSEC-2026-0037, 0185) - rust_decimal 1.43, which drops rkyv 0.7 (RUSTSEC-2026-0235) Also clears the unsoundness advisories on anyhow, cxx, event-listener, memmap2 and rand, and moves spin, validit and num-bigint off yanked releases. Applied to the root lockfile and to each excluded package's.
imbl-sized-chunks 0.1.3 has a double free / use-after-free in Chunk removal (RUSTSEC-2026-0292). imbl 4 through 6 still depend on it; 7 is the first release on the fixed 0.2. It also drops `bitmaps`, which is unmaintained and unsound (RUSTSEC-2026-0247, RUSTSEC-2025-0167). The only user is NoveltyFactState's OrdMap (get / insert / clone), which compiles unchanged.
lru 0.12.5 is flagged for an IterMut Stacked Borrows violation (RUSTSEC-2026-0002) and a use-after-free when a drop panics inside pop (RUSTSEC-2026-0253). None of the API changes since 0.12 touch our call sites. Reasoner and query each pinned their own `lru = "0.12"`; they now take the workspace version.
testcontainers 0.23 depends on tokio-tar 0.3, which mis-parses PAX headers and has no fixed release (RUSTSEC-2025-0111); 0.28 uses astral-tokio-tar. Dev-only and the `aws-testcontainers` feature; the LocalStack suites compile unchanged.
aaj3f
left a comment
There was a problem hiding this comment.
@bplatz this is the shape I'd want for a dependency sweep, and at a design level no pushback from me. Patch bumps go in the lockfiles, the three majors only where the fix actually lives, and query/reasoner move onto the workspace lru so they can't drift off again. Two headline notes:
(1) After this merges, cargo audit still isn't clean. Eight vulnerability rows remain: rustls-webpki 0.101.7 ×3, quick-xml 0.36.2 / 0.39.4 ×2 each, and h2 0.3.27. All of them are older than this PR, and none has a lockfile fix. The webpki and h2 ones are the HTTP/1.1-pinned Iceberg S3 client, and since smithy's hyper-1 client has no HTTP/1-only knob, leaving that line is really a decision about the GCS workaround. That's yours, not this PR's. I'd just like the body to name all four, so the next audit run doesn't read as a regression.
(2) I think this should go in before v4.2.4 (#2041), but aws-lc-sys 0.45 has never been compiled for aarch64 Linux or inside the manylinux_2_28 wheel container. A workflow_dispatch of python-release.yml on this branch builds all four release wheels on the release runners and publishes nothing, so we don't have to find out on the tag. Good to merge whenever after that.
Full review below:
✅ Approve with nits.
Thanks @bplatz. This is a tidy sweep, and the table in the body made each row easy to check. I don't have cargo-audit installed, so I matched all six lockfiles, at main and at this head, against a fresh clone of the RustSec advisory DB with a small script over each advisory's patched/unaffected ranges. Every advisory the table names is cleared at the version it names. quinn-proto 0.11.19 also clears four the body doesn't list (2026-0338, 0339, 0340, 0342). Nothing below has to land before merge: one item is about the record, and the rest are cheap checks.
Should address:
-
🟠 Name what's still flagged (
Cargo.lock:7678, inline). Eight vulnerability rows remain in the root lockfile:rustls-webpki0.101.7: 2026-0098, 0099 and 0104, the same IDs the table lists as cleared, which holds for 0.103 only;h20.3.27;quick-xml0.36.2 viafluree-doc-parse;quick-xml0.39.4 viaobject_store0.13.
None has a lockfile fix. A "not addressed, and why" paragraph in the body would cover it. The
fluree-doc-parsebump is small enough that I'd fold it in if you agree.
Optional:
- 🟡 aws-lc-sys 0.45 hasn't been built for aarch64 Linux or in
manylinux_2_28, and a branch dispatch ofpython-release.ymlwould cover both without publishing (Cargo.lock:748, inline). - 🟡 imbl 7 under
NoveltyFactState's per-flakeget/inserthasn't been measured, and the on-demand bench compare doesn't includetransact_commit/novelty_replay(Cargo.toml:77, inline). - 🟡
wasm-probe/Cargo.lockis onexxhash-rustedge short of--locked, the same edge614801118added totestsuite-shacl(wasm-probe/Cargo.lock:1098, inline).
What I checked and found clean:
- The diff is lockfiles plus five manifest lines, with no
.rschanges.cargo metadata --lockedpasses in the root,fluree-sql-bridge,scripts/local/loadand both testsuites, both at this head and on a trial merge with #2041's head (which merges cleanly). rust_decimal: db doesn't use it directly. Its only path in isbyte-unitunder openraft's config parsing (featurestdonly), and db's own decimals arebigdecimal(fluree-db-core/src/value.rs:149). So dropping rkyv 0.7 has no persisted-format or reindex implications, and rkyv no longer resolves at all.- aws-lc-sys 0.37 → 0.45: the source-build builder selection, the
ccbuilder's dependency check, the NASM rule and the pregenerated-bindings target list are unchanged. So I don't see a new cmake/nasm/clang requirement for the four release targets. 0.45 does add auto-detection of a system AWS-LC, but it only adopts an install that definesOPENSSL_IS_AWSLCand ships bindings, and none of our workflows set the variables it reads. - CI on this head:
- compiled aws-lc-sys 0.45 on Windows x86_64 MSVC, macOS aarch64 and Linux x86_64 (the three
pythonjobs,test,clippy); - compiled imbl 7 (with its new
wideSIMD dependency) and lru 0.18 for wasm32, andwasm-smokeran the probe; - ran all fifteen LocalStack tests by name on testcontainers 0.28.
- compiled aws-lc-sys 0.45 on Windows x86_64 MSVC, macOS aarch64 and Linux x86_64 (the three
Adherence to repo commitments:
- Patterns/abstractions: ✔ Majors are only where the advisory forces them, and the two private
lru = "0.12"pins now take the workspace version. - Performance (speed first, memory second):
⚠️ No code changes. imbl 7 changes the persistent map under a per-flake path influree-db-novelty. Upstream reports it faster, but it isn't measured here (🟡 above). - Deployment targets:
⚠️ Reaches every host. CI covers Linux x86_64, macOS aarch64, Windows x86_64 and wasm32. aarch64 Linux,manylinux_2_28and the fat-LTO release profile aren't built on a PR (🟡 above). - Testing: ✔ Full nextest on this head (14,169 passed), the LocalStack suites by name, the Python wheels on three OSes, and wasm-smoke.
- Conventions:
⚠️ Commits are well split and each body names its advisories. The PR body should list what's still flagged (🟠 above).
Verified locally at 614801118: advisory matching of all six lockfiles against rustsec/advisory-db at base and head; cargo metadata --locked in all six workspaces, at the head and on a trial merge with #2041; cargo tree -i for each remaining advisory crate; the aws-lc-sys 0.37.1 vs 0.45.0 build scripts, read side by side; and the CI job logs, grepped for which jobs compiled what. I didn't run benches.
Approving so you can merge when ready. I'd just get the remainder into the body, and kick off the wheel build first if this is going into 4.2.4.
| [[package]] | ||
| name = "rustls-webpki" | ||
| version = "0.103.9" | ||
| version = "0.103.15" |
There was a problem hiding this comment.
🟠 Should address: cargo audit still reports eight vulnerability rows after this PR, and the table's rustls-webpki row reads as if all four of its advisories are gone.
There are two rustls-webpkis in this lockfile. 0.103.9 → 0.103.15 clears 2026-0049, 0098, 0099 and 0104, but 0.101.7 (line 7668) stays. 0098, 0099 and 0104 all apply to it, and there's no 0.101 fix (patched is >= 0.103.12 only). It's the rustls 0.21 / hyper 0.14 stack under http1_only_http_client() (fluree-db-iceberg/src/io/storage.rs:164-171), so it's in the default CLI, server and Python builds, on every Iceberg S3 read. The same client brings h2 0.3.27 (2026-0258). That one is compiled but never negotiated, since the connector advertises no ALPN.
Then there's quick-xml. 0.36.2 comes in via fluree-doc-parse's docx/pptx readers (2026-0194, 0195). 0194 is reachable through e.attributes() in fluree-doc-parse's crates/fluree-doc-docx/src/lib.rs:198 on a crafted document, which in db means the CLI's fluree doc. 0.39.4 comes in via object_store 0.13.2, and it's fixed only in object_store 0.14, which parquet 58 / delta_kernel 0.28 don't take yet. Every one of these advisories was published between April and August, so all of them were in main's audit when this was opened.
The failing scenario is just the record: someone runs cargo audit after this merges, or a scanner runs it against 4.2.4, and finds eight vulnerabilities after a PR titled "move RustSec-flagged dependencies to patched releases".
I'd add a short "not addressed, and why" section to the body:
- webpki 0.101 / h2 0.3: smithy's hyper-1 client hard-codes
enable_http1().enable_http2()and keeps its connector wrapperpub(crate)(aws-smithy-http-client1.4.0). That's the reasonCargo.toml:130-131gives for staying on hyper 0.14. Leaving it needs an upstream knob or our ownHttpClientover hyper 1, and that's a call on the GCS workaround that's yours to make. - quick-xml 0.36: a bump in
fluree-doc-parse(its main still says"0.36"), then a repin ofCargo.toml:200-205. - quick-xml 0.39: waits on
object_store0.14.
The fluree-doc-parse bump is small enough that if you agree, I'd rather it go in with this sweep than be the next one's.
There was a problem hiding this comment.
Agreed. The body now has a "Still flagged" section covering all eight rows, each with a follow-up issue:
- rustls-webpki 0.101 / h2 0.3: Iceberg's HTTP/1.1-only S3 client keeps rustls-webpki 0.101 and h2 0.3, which have no fixed release #2114. I checked
aws-smithy-http-client1.5.0 (the latest), and it still has no HTTP/1-only option on hyper 1:ConnectorBuilder::wrap_connectorispub(crate), and the new pool offersh2in ALPN unless a request is HTTP/1.0 or asks to upgrade. So moving off is our ownHttpClientor an upstream change, as you said. I labeled ittriage:needs-decision. - quick-xml 0.39 / object_store 0.13: quick-xml 0.39 via object_store 0.13 (Delta Kernel) has advisories that wait on object_store 0.14 #2116. One step further than parquet: parquet 60 takes
object_store0.14, but delta_kernel 0.29 still offers onlyarrow-58andarrow-59, so this waits on Kernel. - quick-xml 0.36 / fluree-doc-parse: quick-xml 0.36 in fluree-doc-parse's Office readers has DoS advisories fixed only in 0.41 #2115. I'd rather not fold it in. The fix is quick-xml 0.41, where
BytesText::unescape()is gone and&arrives as a separateEvent::GeneralRef. doc-parse's text handling has to take that event, or document text silently loses characters. That wants its own doc-parse PR with tests. Separately, doc-parse main is 36 commits past our pin, so the repin also brings those changes and invalidates the parse cache throughDOC_PARSE_REV. Of the two advisories, only 0194 applies: doc-parse doesn't useNsReader.
The audit also turned up three rows that weren't in the review, now in the body:
- lru 0.16.3 (RUSTSEC-2026-0253, unsound) through
aws-sdk-s31.128. The fix needsaws-sdk-s31.144 or later, which moves the whole smithy stack, so it's aws-sdk-s3 1.128 still pulls lru 0.16 (RUSTSEC-2026-0253); clearing it needs an AWS SDK refresh #2117. - fluree-sql-bridge's rsa (RUSTSEC-2023-0071), which has no fixed release.
- testsuite-sparql's own quick-xml 0.37.5, which is test-only and goes with quick-xml 0.36 in fluree-doc-parse's Office readers has DoS advisories fixed only in 0.41 #2115.
The quinn-proto row now lists 0338 – 0343. Today's advisory DB has 0341 and 0343 too, both fixed by 0.11.18.
| [[package]] | ||
| name = "aws-lc-sys" | ||
| version = "0.37.1" | ||
| version = "0.45.0" |
There was a problem hiding this comment.
🟡 Optional: aws-lc-sys 0.45 hasn't been built yet for two of the release configurations: aarch64-unknown-linux-gnu, and the manylinux_2_28 container the Linux wheels build in.
I read the 0.37.1 and 0.45.0 build scripts side by side. Builder selection for a source build, the cc builder's dependency check, the NASM rule and the pregenerated-bindings target list are all unchanged, so I don't expect the cmake/clang/nasm requirements to move. And this PR's CI did compile 0.45 on Windows x86_64 MSVC, macOS aarch64 and Linux x86_64 (the three python jobs, test, clippy). But nothing compiled it for aarch64 Linux, which is both a dist target and a wheel target, or inside manylinux_2_28. The Release workflow skips build-local-artifacts on pull requests (run 38156191378).
If this lands before v4.2.4 (#2041), any failure there shows up on the tag, and PyPI's publish doesn't wait for the CLI build. python-release.yml has workflow_dispatch, and publish only runs on a tag push. So gh workflow run python-release.yml --ref chore/security-dependency-updates builds all four release-profile wheels on the release runners and publishes nothing. That's the cheapest way I can think of to see aarch64 Linux and manylinux_2_28 before the tag does.
There was a problem hiding this comment.
Ran it: Python release #38479051233, dispatched on 5163505 (this branch merged with main). All four release-profile wheels built with aws-lc-sys 0.45 and passed their tests on Python 3.10 and 3.14. That covers aarch64 Linux and x86_64 Linux in manylinux_2_28, macOS aarch64 and Windows x86_64. The tag-version check and publish to PyPI were skipped, so nothing was published.
| # Persistent/immutable data structures (structural sharing -> O(1) clone). | ||
| # Used by fluree-db-novelty's current-state fact index. | ||
| imbl = "3" | ||
| imbl = "7" |
There was a problem hiding this comment.
🟡 Optional: imbl 3 → 7 changes the persistent map under a per-flake path, and nothing in db has measured it.
NoveltyFactState (fluree-db-novelty/src/fact_state.rs:76-102) does an OrdMap::get, and usually an insert, for every flake apply_commit sees. imbl 6 rewrote OrdMap as a B+tree, and 7.0 lists more B-tree performance work, so I'd expect this to be neutral or better. I don't think it's a regression risk.
But transact_commit and novelty_replay are the benches that cover this path, and bench.yml's compare_only runs only the four query benches, so the on-demand compare wouldn't see it. A main-vs-branch run of those two would settle it. This is minor and non-blocking, but if you agree it's worth having the number, I'd rather it be on this PR than turn up later.
Commenting here because fluree-db-novelty/src/fact_state.rs is not in this diff.
There was a problem hiding this comment.
Measured locally on macOS arm64: dev-fast profile, medium scale, criterion's full sample count, the branch merged with main, and imbl 3 vs 7 with nothing else changed.
| Bench | imbl 3 | imbl 7 | Change |
|---|---|---|---|
novelty_replay/replay_chain |
65.4 ms | 61.0 ms | −6.7% |
transact_commit/populated_ledger |
1.75 ms | 1.94 ms | +11% |
The populated_ledger regression isn't the commit. That bench's measured closure takes ownership of the Fluree instance and the ledger, so dropping the whole 10k-node ledger falls inside the timed region, and that drop is most of the number. With the closure returning them instead, criterion drops them outside the timing. The commit then measures 132 µs on imbl 3 and 120 µs on imbl 7, 9% faster.
A standalone OrdMap bench agrees. It used a 60k-entry map keyed like FactKey:
- imbl 7 builds the map 2× faster;
- a clone followed by 60 inserts, which is a commit, runs 2.3× faster;
- lookups run 25% faster;
- only dropping a whole map is slower, 0.45 ms → 0.7–1.6 ms, since 16-wide nodes mean more allocations to free.
A whole fact-state map is dropped only when a ledger is closed or evicted, or when novelty is rebuilt after indexing. That doesn't happen per commit.
So imbl 7 is neutral to better on the per-flake path. Separately, populated_ledger mostly measures teardown, which is worth fixing in the bench outside this PR.
| [[package]] | ||
| name = "fluree-db-transact" | ||
| version = "4.1.6" | ||
| version = "4.2.4-beta.2" |
There was a problem hiding this comment.
🟡 Nit: wasm-probe/Cargo.lock is still one line out of sync, so cargo metadata --locked fails in wasm-probe/.
fluree-db-transact's entry here is missing "xxhash-rust". #2008's 1ba743666 added that dependency (fluree-db-transact/Cargo.toml:63), and 614801118 refreshed that exact edge in testsuite-shacl/Cargo.lock, but not here. With the lockfile copied aside, cargo metadata --offline in wasm-probe/ adds that one line and nothing else.
CI doesn't notice because run-node.mjs runs wasm-pack build without --locked, so cargo rewrites the lockfile silently. It's one line, though, and the body says this lockfile is resynced, so I'd rather that be fully true in this PR.
…ash-rust The same edge 6148011 added to testsuite-shacl. Without it, cargo metadata --locked fails in wasm-probe/.
…2068) into fix/write-fidelity-part2 Two conflicts, both with #2056, which fixed the same debug assertion this branch fixed in 9b7cc1a (the resolver's reserved-namespace guard rejected f:message, f:author and f:reverts in txn-meta): - fluree-db-indexer/src/run_index/resolve/resolver.rs: took main's version, the guard deciding through fluree_vocab::txn_meta::may_hold. This branch's widened is_system_txn_meta_entry admitted the same five names and goes; the file now equals main's. - fluree-db-api/tests/it_txn_meta.rs: kept both sides' tests, this branch's an_index_build_keeps_the_user_message_and_author (a file ledger through a full rebuild) beside #2056's. template_sink.rs, trig_meta.rs, txn_meta.rs, admin.rs and fluree-vocab merged cleanly: #2056's predicate check in the txn-meta path sits beside this branch's statement hashing and does not touch it.
Brings in #2102 (one HTTP status table), #2068, #2056, #2053, #2046, #2045 and the v4.2.4 release. - api error.rs: main's exhaustive status_code / error_type tables, with ApiError::ConfigUnavailable and TransactError::ConfigUnavailable classified as 500 err:storage/ReadFailure in both, and rows for them and RequestOverrideRefused in every_variant. - server error.rs: main's derivation from ApiError; this branch's ConfigUnavailable arms move to the API tables. - consensus: SubmissionError keeps both ConfigUnavailable and CommitContention. - server routes/transact.rs: both submission arms and test rows. - transaction.rs, tx_builder.rs: main's txn_attempts loops, with this branch's request-governance argument on every stage_plan / stage_all call.
Moves dependencies flagged by
cargo auditon main to patched releases. Some flagged crates can't move in this PR; they're listed under "Still flagged" with the reason for each.Lockfile-only, semver-compatible
quinn-proto and rkyv are in the lockfile but not compiled into any build: reqwest's
http3and rust_decimal'srkyvfeatures are off. They're bumped so the audit no longer reports them.anyhow, cxx, event-listener, memmap2 and rand 0.8/0.9 move past their unsoundness advisories. spin and validit move off yanked releases.
Manifest bumps
Chunkremoval (RUSTSEC-2026-0292). imbl 4, 5 and 6 still depend on it; 7 is the first release on 0.2. This also dropsbitmaps(unmaintained, unsound). The only user isNoveltyFactState'sOrdMap(get/insert/clone), which compiles unchanged. imbl 6 rewroteOrdMapas a B+tree; ordering and structural sharing are the same.promote/demotenow returnbool, MSRV, hashbrown). Reasoner and query each declared their ownlru = "0.12"; they now take the workspace version.aws-sdk-s3still brings its own lru 0.16; see below.aws-testcontainers). Drops tokio-tar, which has no fixed release (RUSTSEC-2025-0111).The excluded packages get the same patch bumps: fluree-sql-bridge, scripts/local/load, testsuite-sparql, testsuite-shacl and wasm-probe. The three that path-depend on workspace crates also pick up imbl 7 and lru 0.18. wasm-probe's lockfile was still on the 4.1.6 crate versions and is resynced.
Still flagged
After this PR,
cargo auditon the root lockfile still reports eight vulnerability rows and one unsoundness warning. None of them can be cleared by a lockfile update, and all were already reported on main.aws-smithy-http-clienthas no HTTP/1-only option on hyper 1, so moving off needs our own client or an upstream change. Follow-up: Iceberg's HTTP/1.1-only S3 client keeps rustls-webpki 0.101 and h2 0.3, which have no fixed release #2114object_store0.13, which Delta Kernel requires. It's fixed inobject_store0.14, which waits on a Delta Kernel release that supports it. Follow-up: quick-xml 0.39 via object_store 0.13 (Delta Kernel) has advisories that wait on object_store 0.14 #2116aws-sdk-s31.128. The fix isaws-sdk-s31.144 or later, which moves the whole AWS SDK stack. Follow-up: aws-sdk-s3 1.128 still pulls lru 0.16 (RUSTSEC-2026-0253); clearing it needs an AWS SDK refresh #2117The excluded packages have two more: