fix: remediate AngleSharp CVE-2026-54570 and add dependency audit gate - #167
Merged
Conversation
- Pin AngleSharp to patched 1.5.0 (central) over vulnerable 1.4.0 pulled in via bunit - Add direct AngleSharp reference in FastMoq.Web so the patched build applies to the packable web project and its consumers - Add security-audit CI job that runs the NuGet vulnerability audit and fails the build on any advisory
Contributor
There was a problem hiding this comment.
Pull request overview
This PR remediates a reported AngleSharp vulnerability affecting FastMoq.Web (via bUnit) by pinning AngleSharp to a patched version and adds a CI gate to prevent known-vulnerable NuGet dependencies from merging unnoticed.
Changes:
- Pin
AngleSharpto1.5.0via central package management. - Add an explicit
AngleSharpPackageReferencetoFastMoq.Webso the patched version is applied and flows to consumers of the packable web package. - Add a
security-auditCI job that runsdotnet list ... --vulnerable --include-transitiveand fails the workflow when advisories are detected.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| FastMoq.Web/FastMoq.Web.csproj | Adds a direct AngleSharp package reference so the centrally pinned patched version is applied for the packable web project. |
| Directory.Packages.props | Centrally pins AngleSharp to 1.5.0 with context for the advisory being remediated. |
| .github/workflows/template_ci.yml | Introduces a CI “security-audit” job to fail builds when vulnerable NuGet dependencies are detected. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/template_ci.yml:36
actions/setup-dotnetcaching uses thecache-dependency-pathfile list to build the cache key. Since this repo manages versions centrally viaDirectory.Packages.props, changes to that file (like the AngleSharp pin in this PR) won't invalidate the cache unless it's included here, which can cause CI to reuse stale NuGet caches.
cache: true
cache-dependency-path: |
**/*.csproj
**/*.sln
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.
Plain language
Fixes a moderate security vulnerability (CVE-2026-54570) in the AngleSharp HTML parser that FastMoq.Web pulls in transitively through bUnit, by forcing the patched 1.5.0 build. Also adds a CI check that fails the build if any dependency has a known vulnerability.
Why / Value
AngleSharp 1.4.0, resolved transitively via bunit, is affected by CVE-2026-54570 / GHSA-pgww-w46g-26qg (mutation XSS, CVSS 6.9). FastMoq.Web ships bunit as a dependency, so the vulnerable package flows to consumers of the package. Pinning the patched build clears the advisory, and the new CI gate stops future vulnerable dependencies from merging silently.
What
Validation
dotnet list FastMoq.sln package --vulnerable --include-transitive
dotnet build FastMoq.Web/FastMoq.Web.csproj -c Release
Risk & Rollback
Final: Low.