Fix NU1903 by overriding SSH.NET to the patched release (task 206) #146
Loading…
Reference in a new issue
No description provided.
Delete branch "task-206-nu1903-ssh-net"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task 206.
dotnet restorefails onmainitself:NU1903on SSH.NET 2025.1.0 (GHSA-q939-rpr3-3284, high severity), pulled transitively byTestcontainers.PostgreSql(4.13.0, still latest — no newer Testcontainers exists yet to pick up a fix on its own).TreatWarningsAsErrorsturns the audit warning into a hard error, so nothing restores, builds or tests on any branch.Upgrade, not suppression. SSH.NET 2026.0.0 is out and is the advisory's own listed patched version (confirmed against the GHSA record, not inherited from an earlier check). Added as a direct
PackageReferencein the three affected projects —PlaceMark.Infrastructure.Tests,PlaceMark.E2E.Tests,PlaceMark.Api.Tests, the only ones referencingTestcontainers.PostgreSql— which overrides the transitive 2025.1.0 pull. No production project is affected; this project never uses SSH.NET directly or the remote-Docker-over-SSH transport it's for.No
NuGetAuditSuppress, noNoWarn, noTreatWarningsAsErrorschange — the advisory is gone, not silenced.No ADR: this is a routine transitive-dependency override picking up a published patch, not a suppression or an architecturally significant decision — nothing here is expensive to reverse or worth re-arguing later. ADR-0124 stays unclaimed.
Verified against
mainitself, not just this branch: restore and full solution build are clean with no NU1903. Full suite green, includingPlaceMark.Infrastructure.Tests(320) andPlaceMark.Api.Tests(605) — the two heaviest Testcontainers users, confirming no runtime break from the SSH.NET major-version bump. 1802 total / 1788 passing / 14 skipped (E2E gated,PLACEMARK_RUN_E2E_TESTSunset locally).dotnet format --verify-no-changesclean.Verdict: changes needed
Checked against commit
7237603(current PR head, matches CI #612, success, 5m6s — a real full run, not a fast restore failure).Everything substantive checks out, independently, not just re-reading the PR body:
PlaceMark.Infrastructure.Tests(320) andPlaceMark.Api.Tests(605) both pass clean on this branch, real Testcontainers spin-up (~58-60s each), noMethodNotFoundException/TypeLoadExceptionanywhere.dotnet list package --include-transitiveshows SSH.NET resolves to 2026.0.0 in the three test projects and is entirely absent from every production project (PlaceMark.Infrastructure,PlaceMark.Apichecked directly).origin/mainis still exactly the PR's own merge-base (2405cf3), so what I built and tested is the merge. Full suite: 1802 total / 1788 passing / 14 skipped, matching the PR body's own count exactly.dotnet restoreanddotnet format --verify-no-changesboth clean with no flags, no bypass.The one gap, and why it's worth a round trip rather than a suggestion: the added line in all three
.csprojfiles is bare —— no comment naming the advisory, why 2026.0.0 specifically, or what makes this removable later. Skipping the ADR is fine (this is squarely ADR-0001's own "choosing a library version is not an ADR" example), but the PR body's own reasoning needs to live in the file a future
dotnet list package --outdatedor dependency bump finds, not only in a merged PR description nobody reads again. One short comment above each of the three lines — advisory id, that 2026.0.0 is the advisory's own listed patch, and "remove once Testcontainers.PostgreSql depends on a patched SSH.NET itself" — closes it.Nothing else to change.
Verdict: mergeable
Checked against commit
ba7d917(current PR head, matches CI #613, success, 5m8s).7237603is comment-only, on all three files — confirmed from the PR's own full diff and each file's addition count (Api.Tests +3, E2E.Tests +3, Infrastructure.Tests +10; the latter two comments cross-reference the former's own). TheSSH.NETPackageReferenceline itself is byte-identical to what I verified at7237603in every file. Nothing else changed.SSH.NET (>= 2025.1.0)is a genuine direct dependency ofTestcontainersitself (whichTestcontainers.PostgreSqldepends on), consistent with the comment's "arrives transitively" claim and with GitHub's own Testcontainers-dotnet issues describing SSH-based remote Docker connections as the (currently unsupported-in-practice) reasonDocker.DotNet.Enhancedcarries it. Every other claim in the comment — GHSA-q939-rpr3-3284, high severity,TreatWarningsAsErrorsmaking NU1903 fatal, 2026.0.0 being the advisory's own listed patch rather than merely newest, and that no production project carries SSH.NET — matches what I independently confirmed last round exactly, not approximately.dotnet format --verify-no-changesclean, no flags. 1802 total / 1788 passing / 14 skipped — identical to the count confirmed at7237603.Did not redo the advisory range, runtime-compatibility or scope checks themselves, per your note — nothing since
7237603could have touched them, and this diff confirms it.