Security: pin SSH.NET past GHSA-q939-rpr3-3284 - #79
Merged
Conversation
SSH.NET 2025.1.0 comes in transitively through Testcontainers and picked up a High severity advisory published after the last master build, so CI started failing on a tree nobody had changed. Transitive pinning is already enabled, so naming the version in Directory.Packages.props is the whole fix. dotnet list package --vulnerable now reports nothing for BarakoCMS.Tests.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe package configuration adds a central ChangesSSH.NET security update
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This change pins SSH.NET to address the reported vulnerable transitive version, with vulnerability checks and the full test suite passing. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
SSH.NET2025.1.0 arrives transitively — we never reference it. The chain isBarakoCMS.Tests→Testcontainers.PostgreSql→Testcontainers→SSH.NET, which Testcontainers uses for its SSH port-forwarding container.GHSA-q939-rpr3-3284 (path traversal in
ScpClient's recursive download, CVSS 7.1 High) was published 2026-08-09 and patched in SSH.NET 2026.0.0. Master last built green on 2026-08-11, so CI started failing on a tree nobody had touched — the .NET vulnerability gate doing exactly its job.Has Testcontainers fixed it upstream?
Not yet. Every published version still declares the vulnerable one:
So upgrading Testcontainers would not help. testcontainers-dotnet#1738 and PR #1739 opened upstream today to raise the floor, both still open.
The upstream issue explains why the pin is the right fix rather than a workaround: Testcontainers declares
SSH.NET [2025.1.0, ), an open-ended range, and NuGet resolves the lowest version in a range — so a default restore lands on exactly 2025.1.0. Naming 2026.0.0 satisfies that range and is a supported resolution, not an override. When upstream releases, this pin becomes redundant and can be dropped.Scope
Test-only: SSH.NET is not in any shipped package, and nothing in the product touches
ScpClient. The gate is right to fail on it regardless — a High advisory in the build shouldn't be something we learn to ignore.Transitive pinning is already on, so naming the version in
Directory.Packages.propsis the entire fix.dotnet list package --vulnerable --include-transitivenow reports nothing, and the full suite passes.Split out from #78 so a security bump isn't buried in a test-coverage change.