Skip to content

CI: NU1903 (SSH.NET GHSA-q939-rpr3-3284) fails dotnet restore on every branch; suppression is temporary #762

Description

@sabbour

Problem

dotnet restore --locked-mode now fails for tests/Agentweaver.Tests/Agentweaver.Tests.csproj:

error NU1903: Warning As Error: Package 'SSH.NET' 2025.1.0 has a known high severity vulnerability,
https://github.com/advisories/GHSA-q939-rpr3-3284

The repo sets TreatWarningsAsErrors=true in Directory.Build.props, so the NuGet audit
warning becomes a restore failure. This breaks the .NET tests job on every branch, and
because the job dies during restore it never reaches the required
"Run Kata Linux runtime regressions" gate.

This is time-triggered, not code-triggered: run 31652004441 (2026-08-12T23:54Z) restored
fine, run 31656364288 (2026-08-13T01:02Z) did not. The advisory was published in between.

Why it cannot simply be upgraded

SSH.NET is transitive via Testcontainers.PostgreSql -> Testcontainers 4.13.0.
dotnet package search SSH.NET --exact-match lists 2025.1.0 as the newest published
version, i.e. upstream has not shipped a fix yet. There is nothing to upgrade to.

Interim mitigation (already applied)

A narrowly scoped NuGetAuditSuppress for this one advisory ID, in the test project only:

<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-q939-rpr3-3284" />

Justification:

  • Test-only. SSH.NET appears in exactly one lock file in the repo,
    tests/Agentweaver.Tests/packages.lock.json. No product project resolves it, so it
    ships in nothing.
  • Unreachable code path. The advisory is a path traversal in
    ScpClient.Download(string, DirectoryInfo) during a recursive SCP directory download
    from an untrusted SCP server
    . Nothing in the repository references ScpClient or
    Renci.SshNet; Testcontainers only uses SSH.NET for its optional "remote Docker over
    SSH" transport, which the suite never configures.

Done when

  • A patched SSH.NET is published (or Testcontainers bumps its floor).
  • The NuGetAuditSuppress item is removed from tests/Agentweaver.Tests/Agentweaver.Tests.csproj.
  • dotnet restore --locked-mode is green without the suppression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions