Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet list package --vulnerable ignores auditSources in NuGet.Config #44722

Closed
rcocks-hl opened this issue Nov 7, 2024 · 3 comments
Closed
Labels
Area-NuGet untriaged Request triage from a team member

Comments

@rcocks-hl
Copy link

rcocks-hl commented Nov 7, 2024

I have <auditSources> defined in my NuGet.Config file as:

  <auditSources>
        <clear />
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </auditSources>

When I run: dotnet list package --vulnerable , it fails because it still tries to contact my private package source defined in packageSources.

Is there a way so that it only audits from the auditSources when running dotnet list package --vulnerable?

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NuGet untriaged Request triage from a team member labels Nov 7, 2024
@KalleOlaviNiemitalo
Copy link
Contributor

In my opinion, this should be doable by using dotnet list package --vulnerable --source DIR where DIR is the path of an empty directory; --source should then override packageSources but not auditSources. However, according to the dotnet list package documentation, that doesn't work: --source requires either --outdated or --deprecated, and neither of those can be combined with --vulnerable.

Copy link
Contributor

Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the NuGet repository instead. Don’t forget to check out NuGet’s contributing guide before submitting an issue!

If you believe this issue was closed out of error, please comment to let us know.

Happy Coding!

@rcocks-hl
Copy link
Author

rcocks-hl commented Nov 7, 2024

Sorry, I thought I was in that repo, creating in there.

Update: Looks like it exists already as NuGet/Home#13767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NuGet untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants