[APS-19257][APS-19258] fix: pin System.Net.Http 4.3.4 + System.Text.RegularExpressions 4.3.1#9
Open
Rohannagariya1 wants to merge 1 commit into
Conversation
…ions 4.3.1 [APS-19257 APS-19258] - Add explicit PackageReference pins overriding vulnerable transitive 4.3.0 versions pulled in via NETStandard.Library 1.6.1 - System.Net.Http 4.3.0 -> 4.3.4 (GHSA-7jgj-8wvc-jh57, .NET Core Information Disclosure) - System.Text.RegularExpressions 4.3.0 -> 4.3.1 (GHSA-cmhx-cq75-c4mj, Regex DoS) - project.assets.json confirms resolved versions are now 4.3.4 / 4.3.1 Resolves: APS-19257, APS-19258 Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Security Fix: APS-19257 + APS-19258
Issue
Two High-severity (CVSS 7.5) GitHub advisories flagged on this repo:
Root Cause
Both packages were present transitively at the vulnerable 4.3.0 version, pulled in via the legacy
NETStandard.Library 1.6.1meta-package that the BrowserStack SDK dependency chain references (verified inobj/.../project.assets.jsononmain). They are not direct references, so they must be overridden with an explicit pin.Note:
dotnet list package --vulnerablecrashes on this project with"Sequence contains no matching element"(a known SDK bug triggered because this csproj lacks<IsTestProject>true</IsTestProject>), so the scanner can't print them — butproject.assets.jsonconfirms both resolve at the vulnerable 4.3.0. This is a real finding, not a false positive. Dependabot did not open a PR here (coverage gap), unlike the sibling MSTest/nunit/xunit repos.Fix Applied
Added two explicit
PackageReferencepins to the test.csproj:After the fix,
project.assets.jsonresolves System.Net.Http = 4.3.4 and System.Text.RegularExpressions = 4.3.1. No application/source code changes.Testing
dotnet restoresucceeds;project.assets.jsonconfirms patched versions (4.3.4 / 4.3.1).dotnet buildfails on bothmainand this branch withMicrosoft.NET.Test.Sdk doesn't support net6.0— becauseMicrosoft.NET.Test.Sdk Version="*"floats to 18.6.0, which dropped net6.0 support. This is unrelated to the security pins and should be addressed separately (bump TargetFramework to net8.0, or pin Microsoft.NET.Test.Sdk to a net6.0-supporting version).dotnet testrun locally. Change is dependency-metadata only.Jira Tickets
Checklist