Skip to content

refactor: make source risk sorting explicit#93

Merged
willsarg merged 1 commit intomainfrom
fix/security-78
Apr 13, 2026
Merged

refactor: make source risk sorting explicit#93
willsarg merged 1 commit intomainfrom
fix/security-78

Conversation

@willsarg
Copy link
Copy Markdown
Contributor

Summary

  • replace the custom iterator-based sorting helper with an explicit local Vec::sort_by path
  • keep the risky-file ordering logic self-contained in source_analysis.rs
  • add a regression test for the existing count-then-path ranking semantics

Validation

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo build
  • cargo test
  • ./scripts/test-scanner.sh (current origin/main still segfaults in quick/scan; the same baseline failure remains here)

Closes #78

Replace the custom sorted_by iterator extension with an explicit local Vec::sort_by flow in source analysis so the risky-file ordering logic is obvious and dependency-safe.

Add a regression test that preserves the count-then-path ordering semantics for top_risky_files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@willsarg willsarg merged commit 197f0f5 into main Apr 13, 2026
@willsarg willsarg deleted the fix/security-78 branch April 13, 2026 15:24
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.

Make source-analysis sort behavior explicit and dependency-safe

1 participant