Fix Snyk high-severity dependency vulnerabilities (Infrastructure.csproj) - #75
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits 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:
|
Co-Authored-By: shayan <shayan@cognition.ai>
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
All 14 Snyk SCA findings (across
src/Infrastructure,src/WebApi,tests/WebApi.Testsmanifests) originate fromsrc/Infrastructure/Infrastructure.csproj, so a single 3-line csproj change fixes them everywhere.Microsoft.EntityFrameworkCore.SqlServerremoved rather than upgraded: the app is PostgreSQL-only (UseNpgsqlinProgram.cs; noUseSqlServeranywhere), so the package was dead weight. Removing it drops the entireMicrosoft.Data.SqlClient→Azure.Identity/System.Drawing.Commonchain. (Upgrading to EF SqlServer 7.0.20 would still pullMicrosoft.Data.SqlClient5.1.x with a vulnerableAzure.Identitytransitive, so removal is the cleaner fix.)AspNetCore.HealthChecks.NpgSql@7.0.0in WebApi still references Npgsql 7.0.4, but NuGet resolves to 7.0.7 via the transitive Infrastructure reference (verified in all threeproject.assets.json).System.Text.Json8.0.5 pinned directly to override the 7.0.0 transitive fromMicrosoft.EntityFrameworkCore.Design→Microsoft.Extensions.DependencyModel@7.0.0(no EF 7.x Design release moves off it). The listed fix version 8.0.4 has its own high-severity issue (SNYK-DOTNET-SYSTEMTEXTJSON-8168848, flagged by the Snyk PR check), so 8.0.5 is used. Targetsnet6.0/netstandard2.0, compatible with net7.0.Verified locally:
dotnet restore,dotnet build(0 errors),dotnet test(20/20 pass),snyk test --all-projects→ "Tested 6 projects, no vulnerable paths were found."Note on CI: the
buildcheck fails onmaintoo (pre-existing):.github/workflows/dotnet.ymlinstallsdotnet-version: 6.0.xand theubuntu-latestrunner has no .NET 7 runtime, sodotnet testaborts with "You must install or update .NET". Changing it to7.0.xwould fix CI; left out of this PR as it's unrelated to the Snyk remediation.Snyk issues resolved
Skipped
None. No SAST (Snyk Code) findings were reported for this repo.
Link to Devin session: https://app.devin.ai/sessions/ad1a5e21240446f29784a9b63c8387b0
Open in Devin Desktop: https://app.devin.ai/desktop/session/ad1a5e21240446f29784a9b63c8387b0?variant=devin
Requested by: @shayanshafii