Repository navigation
Fix HTML report reference group sorting - #2479
Closed
rajsshah86 wants to merge 1 commit into
Closed
rajsshah86 wants to merge 1 commit into
rajsshah86 wants to merge 1 commit into
Conversation
Use numeric-aware collation with a deterministic tie-breaker for mixed reference IDs. Regenerate the bundled report resources and cover all grouping modes with optional Node.js regression tests. Fixes OpenSCAP#2478 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rajsshah86
requested review from
Mab879,
jan-cerny and
matusmarhefka
as code owners
November 1, 2026 12:31
|
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
Fixes #2478.
HTML report reference groups can remain out of numeric order when numeric and textual IDs are mixed. The existing comparator checks the first operand twice and can return
NaN. Simply correcting that typo is not sufficient: mixing numeric and lexical token comparisons still yields non-transitive ordering for references such asAU-9(3),AU-12(c), andAU-12 b.01and1).xsl/xccdf-resources.xslwith the existing YUI compressor build script so generated reports contain the fix.Validation
node tests/report/sort_groups.jspasses for both source and bundle, covering 27 reference-grouping keys, mixed numeric/text permutations, dotted references, NIST formats, leading zeros, empty/single/duplicate values, severity/result permutations, and default reset behavior.xmllint --noout xsl/xccdf-resources.xsl, andgit diff --checkpass.This changes presentation ordering only, not evaluation results.