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

Move the vulnerable restore bar checks into the try part #5460

Merged

Conversation

nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Oct 14, 2023

Bug

Fixes: NuGet/Home#12939

Regression? Last working version:

Description

RestoreSummaries can be null when the restore spec validation fails.
An example is a project with an incorrect framework.

The vulnerable bar should've been in the try part anyways.
The finally part must never throw.

Note that this is an imperfect, partial fix. There's a follow up that'll need a longer fix in NuGet/Home#12943.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception - Really hard to setup the test case as this would require an E2E/Apex right now, and get the tests to write a bad project file would be really hard. For now, gonna add an E2E test.
    • OR
    • N/A
  • Documentation

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

@nkolev92 nkolev92 marked this pull request as ready for review October 17, 2023 16:16
@nkolev92 nkolev92 requested a review from a team as a code owner October 17, 2023 16:16
@nkolev92 nkolev92 merged commit 041c6da into dev Oct 17, 2023
@nkolev92 nkolev92 deleted the dev-nkolev92-makevulnerabilityrestorebarchecksnullsafe branch October 17, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants