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

Enable NuGet audit #75049

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<add key="vs-impl-archived" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl-archived/nuget/v3/index.json" />
<add key="vs-buildservices" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
</packageSources>
<auditSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
Expand Down
8 changes: 8 additions & 0 deletions eng/targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
<!-- TODO: https://github.com/dotnet/roslyn/issues/71667 -->
<NoWarn>$(NoWarn);NU1507</NoWarn>

<!--
Do not error on NuGet audit warnings. These are warnings that are introduced asynchronously as
new vulnerabilities are discovered. Having these as errors means that CI would pass on on job,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on on

typo: on on

and then potentially fail on the next. This is meant to be an early warning system, not a
random CI failure generator.
jaredpar marked this conversation as resolved.
Show resolved Hide resolved
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this doesn't work, CI is failing with NU1903 :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I know. It's quite frustrating. Trying to understand why that is happening.


<CommonExtensionInstallationRoot>CommonExtensions</CommonExtensionInstallationRoot>
<LanguageServicesExtensionInstallationFolder>Microsoft\VBCSharp\LanguageServices</LanguageServicesExtensionInstallationFolder>

Expand Down
3 changes: 0 additions & 3 deletions src/Compilers/Test/Core/Mocks/Silverlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public static class Silverlight
private static (byte[], byte[]) BuildImages()
{
const string corlibExtraCode = """
using System;
using System.Reflection;

namespace System.Reflection;

[AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/Test/Core/TestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static ImmutableArray<byte> HexToByte(ReadOnlySpan<char> input)

return ImmutableCollectionsMarshal.AsImmutableArray(bytes);

byte parseByte(ReadOnlySpan<char> input, NumberStyles numberStyle)
static byte parseByte(ReadOnlySpan<char> input, NumberStyles numberStyle)
Copy link
Member

@jcouv jcouv Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any objection, but this change (and the one in Silverlight.cs) are unexpected in this PR. Just want to confirm these were intentional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional. It's a follow up comment from a previous PR that I forgot to merge.

{
#if NET
return byte.Parse(input, numberStyle);
Expand Down
Loading