Skip to content

Dependency advisories do not fail the build, and transitive packages are not audited at all #51

Closed

Description

@arnelirobles

Band: small

Directory.Build.props:50 sets TreatWarningsAsErrors, so the build already refuses to ship a warning. It says nothing about dependency advisories, so a known vulnerability in a transitive package is not a warning and does not fail anything.

Right now that is a theoretical gap. I ran the check by hand and it is clean:

$ dotnet list package --vulnerable --include-transitive
The given project `Verdict` has no vulnerable packages given the current sources.
... 18 projects, all clean

The point is that nothing re-runs it. NuGetAudit defaults to direct mode, so transitive packages are not scanned at all, and the packages that matter here are transitive: System.Memory 4.5.5 for Verdict.Extensions, System.Collections.Immutable 10.0.1 for Verdict.Rich, and System.Text.Json 8.0.5 for Verdict.Json, all on the netstandard2.0 target.

What should change

In Directory.Build.props:

<NuGetAudit>true</NuGetAudit>
<NuGetAuditMode>all</NuGetAuditMode>
<NuGetAuditLevel>low</NuGetAuditLevel>

With TreatWarningsAsErrors already set, an advisory at any severity then fails the build rather than waiting for somebody to run the command. low rather than moderate because this is a library, so a consumer inherits whatever it pulls in.

One thing to check before merging: NuGetAuditMode=all on a repo with TreatWarningsAsErrors means a newly published advisory can turn a green build red without anything in the repository changing. That is the intended behaviour and it is still worth knowing, because it will happen on somebody's unrelated pull request.

xUnit 2.6.6 is also flagged deprecated (legacy, superseded by xunit.v3). Not a vulnerability and not urgent, but it belongs on the same pass.

Activity

  1. added this to the v3.0 milestone on Aug 30, 2026
  2. self-assigned this
    on Aug 30, 2026
  3. arnelirobles commented on Sep 29, 2026

    @arnelirobles
    ContributorAuthor

    Shipped in 3.0.0 (PR #60, release v3.0.0). PR #60 had
    no per-issue closing keywords, so this stayed open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions