Fix Snyk-reported vulnerable NuGet packages - #65
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
Remediates the 17 high-severity Snyk SCA findings across the 4 manifests by pinning patched versions of vulnerable (mostly transitive) NuGet packages in the
.csprojfiles. No source/behavior changes; changes are dependency version bumps only.dotnet build,dotnet test(20/20 pass), andsnyk test --all-projectsall pass with 0 vulnerable paths across all 6 projects.Findings fixed
src/Infrastructure/Infrastructure.csproj(added explicit pins to override transitive versions;Npgsqlwas a direct ref):Npgsql7.0.4 → 7.0.7 (SQL Injection) — direct ref bumpedAzure.Identity1.6.0 → 1.13.2 (RCE) — pinned ≥ the 1.12.1 required by SqlClient 5.1.9Microsoft.Data.SqlClient5.0.2 → 5.1.9 (Unprotected Storage of Credentials)System.Text.Json7.0.0 → 8.0.6 (DoS) — 8.x runs fine onnet7.0System.Drawing.Common5.0.0 → 6.0.0 — resolved transitively (SqlClient 5.1.9 → System.Security.Permissions 6.0.0 → System.Windows.Extensions 6.0.0 → System.Drawing.Common ≥6.0.0), which is already past the fixed 5.0.3, so no explicit pin was needed.src/WebApi/WebApi.csproj(transitive viaAspNetCore.HealthChecks.NpgSql):Npgsql7.0.4 → 7.0.7System.Text.Json7.0.0 → 8.0.6tests/Application.Testsandtests/WebApi.Tests(added explicit patched refs for the 4.3.0 transitives):System.Net.Http4.3.0 → 4.3.4 (DoS / Improper Certificate Validation / Information Exposure / Privilege Escalation)System.Text.RegularExpressions4.3.0 → 4.3.1 (ReDoS)Notes / not-fixed
net7.0-compatible ranges and avoided floating versions and any release published in the last 7 days.System.Drawing.Commonexplicit pin was intentionally dropped: SqlClient 5.1.9's chain already forces 6.0.0 (patched), and pinning 5.0.3 caused anNU1605downgrade error.Additional fix (preexisting CI break, unrelated to Snyk)
.github/workflows/dotnet.ymlset updotnet-version: 6.0.xfor anet7.0project, so the test host had no matching runtime anddotnet testfailed (Framework 'Microsoft.NETCore.App' 7.0.0 not found). This already failed onmainbefore this PR. Bumped to7.0.xso CI can actually run the tests.security/snyk (Cognition-default)PR check is failing with "You have used your limit of private tests" — that's a Snyk account/plan quota, not a code issue.Verification
dotnet build→ Build succeeded, 0 errors (3 pre-existing nullable warnings, unrelated).dotnet test→ Passed! 6/6 Application.Tests + 14/14 WebApi.Tests = 20/20.snyk test --all-projects→ "Tested 6 projects, no vulnerable paths were found."Link to Devin session: https://app.devin.ai/sessions/ee2a7a2fa5db44e7a42cb47bbf5125c9
Requested by: @shayanshafii
Devin Review