fix(security): imageproc 0.26 + NaN panic hardening across ruvllm/ruvector-postgres#505
Merged
ruvnet merged 1 commit intoMay 23, 2026
Conversation
Build on the existing security audit branch with additional hardening: - **RUSTSEC-2026-0115/0116/0117**: Bump `imageproc 0.25` → `0.26.2` in `examples/scipix/Cargo.toml`. All three soundness notices (improper bounds checks and fragile sampling code) are fixed in 0.26.x. Remove the now-stale ignore entries from `.cargo/audit.toml`. Replace remaining bare `.partial_cmp(...).unwrap()` — which panics when NaN appears in the slice — with `.total_cmp(...)` (stable since Rust 1.62, NaN-total, no panic) in production source files: - `crates/ruvllm/src/claude_flow/agent_router.rs` (score max/sort) - `crates/ruvllm/src/claude_flow/task_classifier.rs` (score sort) - `crates/ruvllm/src/evaluation/economics.rs` (percentile sort) - `crates/ruvllm/src/metal/operations.rs` (argmax over logits) - `crates/ruvllm/src/qat/calibration.rs` (percentile sort) - `crates/ruvllm/src/training/grpo.rs` (reward/advantage max) - `crates/ruvector-postgres/src/healing/strategies.rs` (strategy weight max) - `crates/ruvector-postgres/src/learning/patterns.rs` (k-means++ distance) - `crates/ruvector-postgres/src/learning/reasoning_bank.rs` (similarity sort) - `crates/ruvector-postgres/src/math/operators.rs` (Wasserstein sort) - `crates/ruvector-postgres/src/quantization/binary.rs` (rerank sort) - `crates/ruvector-postgres/src/sparse/types.rs` (top-k sparse abs sort) - `crates/ruvector-solver/src/forward_push.rs` (argmax in test) Co-Authored-By: claude-flow <ruv@ruv.net>
6c6dadd to
07e1962
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security hardening for the Connectome-OS / RuVector workspace, targeting the `research/connectome-ruvector` branch (which backs the Connectome-OS project).
RUSTSEC Advisory Fixes
examples/scipix/Cargo.tomlStale ignore entries for the three imageproc advisories removed from
.cargo/audit.toml(now actually fixed rather than suppressed).NaN Panic Hardening (partial_cmp → total_cmp)
Replaced all remaining bare
.partial_cmp(...).unwrap()calls — which panic if NaN enters a float slice — with.total_cmp(...)(stable Rust 1.62+, total order, no panic) in production source files:crates/ruvllm/src/claude_flow/agent_router.rs— score max/sortcrates/ruvllm/src/claude_flow/task_classifier.rs— task score sortcrates/ruvllm/src/evaluation/economics.rs— percentile computationcrates/ruvllm/src/metal/operations.rs— argmax over logit arrayscrates/ruvllm/src/qat/calibration.rs— quantization percentilecrates/ruvllm/src/training/grpo.rs— reward/advantage max lookupcrates/ruvector-postgres/src/healing/strategies.rs— strategy weight maxcrates/ruvector-postgres/src/learning/patterns.rs— k-means++ distancecrates/ruvector-postgres/src/learning/reasoning_bank.rs— similarity sortcrates/ruvector-postgres/src/math/operators.rs— Wasserstein CDF sortcrates/ruvector-postgres/src/quantization/binary.rs— rerank sortcrates/ruvector-postgres/src/sparse/types.rs— top-k sparse abs sortcrates/ruvector-solver/src/forward_push.rs— argmax in test assertionTest plan
cargo audit --no-fetchreports zero vulnerabilitiescargo check -p connectome-flycompiles with no errorscargo check -p ruvllmcompiles with no errors🤖 Generated with claude-flow