Skip to content

Conversation

seantleonard
Copy link
Contributor

@seantleonard seantleonard commented May 10, 2024

Why make this change?

  • dotnet restore (via dotnet format implicitly) raises NU1903 warning as an error because older versions of npgsql are tagged as vulnerable due to a high severity vulnerability.

What is this change?

  • Updates build-pipeline yaml to include -v d for detailed verbose logging in dotnet restore step so actual error messages are shown instead of generic failure.
  • Sets separate versions of npgsql for .net6 and .net8:
    • .NET6 -> Npgsql 7.0.7 (set to 8.0.3, until nuget no longer reports 7.0.7 as vulnerable) tracked via npgsql 7.0.7 for .net6 #2206
    • .NET8 -> Npgsql 8.0.3
  • ignores TestDictionaryDatabaseObjectSerializationDeserialization() for .net6 until npgsql 7.0.7 for .net6 #2206 is addressed because npgsql 8.0.3 depends on system.text.json from .net8 which breaks behavior in the test.

How was this tested?

  • Integration Tests
  • Unit Tests

….7 is vulnerable even when updated advisory sent saying 7.0.7 is patched.
@seantleonard
Copy link
Contributor Author

/azp run

Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@seantleonard seantleonard enabled auto-merge (squash) May 10, 2024 21:51
Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good I just had a question about the versions.

@seantleonard seantleonard merged commit 49184a3 into main May 10, 2024
@seantleonard seantleonard deleted the dev/sean/npgsql_workaround branch May 10, 2024 22:23
seantleonard added a commit that referenced this pull request May 14, 2024
## Why make this change?

- Closes #2206
- As noted in #2207, now that false positive vulnerability alert no
longer shows due to correct patched versions being recognized by dotnet
restore.
- Merging Directory to 1.1 branch.

## What is this change?

- For .net6 updates npgsql to 7.0.7.
- Removes "ignore" tag on serialization/deserialization test that broke
because of the npgsql version used.

## How was this tested?
- [x] Unit Tests 
- `dotnet format` step passes without dotnet restore vulnerability
alert.
- unit test `TestDictionaryDatabaseObjectSerializationDeserialization`
unignored
ayush3797 pushed a commit that referenced this pull request May 14, 2024
## Why make this change?

- Closes #2206
- As noted in #2207, now that false positive vulnerability alert no
longer shows due to correct patched versions being recognized by dotnet
restore.
- Merging Directory to 1.1 branch.

## What is this change?

- For .net6 updates npgsql to 7.0.7.
- Removes "ignore" tag on serialization/deserialization test that broke
because of the npgsql version used.

## How was this tested?
- [x] Unit Tests 
- `dotnet format` step passes without dotnet restore vulnerability
alert.
- unit test `TestDictionaryDatabaseObjectSerializationDeserialization`
unignored
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.

3 participants