Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort package vulnerability advisories by severity in descending order #4175

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

jebriede
Copy link
Contributor

Bug

Fixes: NuGet/Home#11091

Regression? Last working version: N/A

Description

Sort the list of vulnerabilities when the PackageSearchMetadataContextInfo is created so the list is cached in order and already in order whenever it is used. Since the list is in order with the highest severity vulnerability at the top, calculate the maximum severity by looking at the first vulnerability to save on computation time of checking for the max in the list.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@jebriede jebriede requested a review from a team as a code owner July 28, 2021 23:55
@jebriede
Copy link
Contributor Author

Vulnerabilities, ordered by severity in descending order:
image

@ghost ghost added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Aug 9, 2021
@ghost
Copy link

ghost commented Aug 9, 2021

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@ghost ghost removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Aug 9, 2021
@ghost ghost added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Aug 16, 2021
@ghost
Copy link

ghost commented Aug 16, 2021

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@ghost ghost closed this Aug 23, 2021
@jebriede jebriede reopened this Sep 29, 2021
@ghost ghost removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Sep 29, 2021
@jebriede jebriede force-pushed the dev-jebriede-SortVulnerabilitiesBySeverityDesc branch from 0b63615 to 2bc3d3b Compare October 1, 2021 22:45
@jebriede jebriede force-pushed the dev-jebriede-SortVulnerabilitiesBySeverityDesc branch 2 times, most recently from 2f7c7b4 to f83d6cb Compare October 7, 2021 20:08
@jebriede jebriede force-pushed the dev-jebriede-SortVulnerabilitiesBySeverityDesc branch from f83d6cb to 96698ab Compare October 11, 2021 19:04
@jebriede jebriede merged commit 8923757 into dev Oct 13, 2021
@jebriede jebriede deleted the dev-jebriede-SortVulnerabilitiesBySeverityDesc branch October 13, 2021 19:03
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.

Sort the package vulnerabilities in descending order in PMUI details pane
6 participants