Skip to content

Commit

Permalink
Merge pull request #23323 from Fryguy/better_sort_npm_excludes
Browse files Browse the repository at this point in the history
Include the GHSA number when sorting npm excludes
  • Loading branch information
jrafanie authored Feb 3, 2025
2 parents f6aa990 + b98210c commit 939322c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/test_security_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def self.rebuild_yarn_audit_pending
end

values
.sort_by { |v| YARN_AUDIT_SEVERITY_SORT.index(v[1]) || Float::MAX }
.sort_by { |v| [YARN_AUDIT_SEVERITY_SORT.index(v[1]) || Float::MAX, v[2]] } # Sort by severity, then by the GHSA number, for consistency
.tableize(:header => false)
.lines
.map { |l| l.sub(/^ /, "# ") }
Expand Down

0 comments on commit 939322c

Please sign in to comment.