Skip to content

chore: patch vulnerable transitive packages - #297

Merged
Aaronontheweb merged 2 commits into
devfrom
chore/fix-vulnerable-transitive-packages
Oct 28, 2026
Merged

Aaronontheweb merged 2 commits into
devfrom
chore/fix-vulnerable-transitive-packages

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Closes out every known-vulnerable package in the solution. dotnet list DrawTogether.sln package --vulnerable --include-transitive now reports zero for all 8 projects.

What was vulnerable (before)

Package Resolved Severity Chain
System.Security.Cryptography.Pkcs 10.0.7 high + moderate EF Core / SqlClient
MessagePack 2.5.192 2 high + 10 moderate Aspire.Hosting → StreamJsonRpc 2.22.23
OpenTelemetry.Api 1.9.0 / 1.10.0 moderate ×2 only in Actors and End2End.Tests
Newtonsoft.Json 12.0.3 high FluentEmail.Mailgun 3.0.2
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.15.0 moderate direct pin

Fix

All of these are transitive-only, so CPM alone could not move them. Enabled CentralPackageTransitivePinningEnabled and pinned each package to its patched release:

Two direct pins also moved to patched versions:

  • OpenTelemetry.Exporter.OpenTelemetryProtocol 1.15.0 → 1.15.3 — GHSA-q834-8qmm-v933
  • Grpc.Tools 2.72.0 → 2.78.0 — the floor Aspire.Hosting.AppHost / Aspire.Hosting.Testing require. Turning on transitive pinning surfaced this as a hard NU1109 downgrade error; it was silently tolerated before because Grpc.Tools is PrivateAssets=all.

Verification

  • dotnet list ... --vulnerable --include-transitive → no vulnerable packages in any project
  • dotnet build -c Release → 0 errors, 15 warnings (down from 47 — the NU1902/NU1903 audit warnings are gone)
  • DrawTogether.Tests → 8/8 passing

Risk

Every pin is a patch-level move within the same major, except Newtonsoft.Json 12 → 13. That one is a transitive dependency of FluentEmail.Mailgun only; 13.x is source-compatible with 12.x apart from a handful of obsolete APIs, and nothing in this repo binds directly to it.

The Security pins ItemGroup is annotated so it can be deleted once the upstream direct dependencies ship patched versions on their own.

Resolves every known-vulnerable package reported by
'dotnet list package --vulnerable --include-transitive'.

Enables CentralPackageTransitivePinningEnabled so transitive-only
packages can be pinned from Directory.Packages.props, then pins:

- System.Security.Cryptography.Pkcs 10.0.7 -> 10.0.14
  (GHSA-846f-f764-76mx high, GHSA-2fmv-rv2c-59x7 moderate)
- MessagePack 2.5.192 -> 2.5.307
  (GHSA-hv8m-jj95-wg3x, GHSA-vh6j-jc39-fggf high, +10 moderate)
- OpenTelemetry.Api 1.9.0/1.10.0 -> 1.15.3
  (GHSA-g94r-2vxg-569j, GHSA-8785-wc3w-h8q6 moderate)
- Newtonsoft.Json 12.0.3 -> 13.0.4
  (GHSA-5crp-9r3c-p9vr high, via FluentEmail.Mailgun)

Also bumps two direct pins to patched versions:
- OpenTelemetry.Exporter.OpenTelemetryProtocol 1.15.0 -> 1.15.3
  (GHSA-q834-8qmm-v933 moderate)
- Grpc.Tools 2.72.0 -> 2.78.0, the floor Aspire.Hosting.AppHost
  requires. Enabling transitive pinning surfaced this pre-existing
  downgrade as a hard NU1109 error.

All 8 projects now report zero vulnerable packages. Build: 0 errors,
15 warnings (down from 47). Unit tests: 8/8.
@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) October 28, 2026 22:14
@Aaronontheweb
Aaronontheweb merged commit 07fbea8 into dev Oct 28, 2026
3 checks passed
@Aaronontheweb
Aaronontheweb deleted the chore/fix-vulnerable-transitive-packages branch October 28, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant