Fix all Snyk NuGet vulnerabilities: move to .NET 8 LTS and patched packages - #74
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: shayan <shayan@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Clears every open-source vulnerability Snyk reported (
snyk test --all-projects: 10 issues / 19 vulnerable paths in Infrastructure + 9 / 24 in WebApi.Tests → 0 across all 6 projects) with manifest-only changes — no source code changes were needed.Three moves:
net7.0→net8.0in all 6 csproj files, with .NET 7/8 base images in theDockerfileanddotnet-version: 8.0.xin CI (was6.0.x, which never matched thenet7.0target). .NET 7 is EOL; this is what makes the 8.x patched package versions installable and removes the EOLsdk:7.0/aspnet:7.0OS vuln surface (35 crit / 184 high and 14 crit / 96 high respectively).Microsoft.EntityFrameworkCore.SqlServerfromInfrastructure.csproj. The app is PostgreSQL-only (grep -rn SqlServer --include=*.cs→ no hits); the package was unused and was the sole source of 6 findings viaMicrosoft.Data.SqlClient@5.0.2(Azure.IdentityRCE,Microsoft.Data.SqlClientcredential exposure,System.Drawing.CommonRCE,System.IdentityModel.Tokens.Jwt/Microsoft.IdentityModel.JsonWebTokensDoS,System.Formats.Asn1).AspNetCore.HealthChecks.NpgSql7.0.0 → 8.0.1,Microsoft.AspNetCore.OpenApi7.0.9 → 8.0.10, and the test stack (FakeItEasy7.4.0 → 8.3.0,Microsoft.NET.Test.Sdk17.5.0 → 17.11.1,xunit2.4.2 → 2.9.2,xunit.runner.visualstudio2.4.5 → 2.8.2,coverlet.collector3.2.0 → 6.0.2) which removed theSystem.Formats.Asn1path viaFakeItEasy > Castle.Core > NETStandard.Library.Vulnerabilities fixed
src/Infrastructure/Infrastructure.csproj, transitivelysrc/WebApivia HealthChecks.NpgSqlsrc/Infrastructure/Infrastructure.csproj(EFCore.SqlServer → Microsoft.Data.SqlClient)src/Infrastructure,tests/*via FakeItEasy/Castle.Coresrc/Infrastructure/Infrastructure.csprojVerification
Tested 6 projects, 3 contained vulnerable paths— 28 high / 35 medium per the dashboard scan.Tested 6 projects, no vulnerable paths were found.(0 critical / 0 high / 0 medium / 0 low)dotnet restore && dotnet build→ succeeded, 0 errors (3 pre-existing nullability warnings unchanged);dotnet test→ 20/20 passing (6 Application + 14 WebApi).No lockfiles exist in this repo, so there is no manifest churn beyond the csproj edits. Nothing was suppressed or ignored, and no tests were modified.
Not fixed
Nothing outstanding on the NuGet side. Note that CI's
actions/setup-dotnetversion was bumped to 8.0.x as part of the retarget; if the deployment pipeline pins .NET 7 runtimes elsewhere (outside this repo), it needs the same move to 8.0.Link to Devin session: https://app.devin.ai/sessions/a9d79b584e454267922a9c093a8454ef
Open in Devin Desktop: https://app.devin.ai/desktop/session/a9d79b584e454267922a9c093a8454ef?variant=devin
Requested by: @shayanshafii
Devin Review