-
Notifications
You must be signed in to change notification settings - Fork 389
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
Add project properties for NuGetAudit #9246
Comments
I took a look at this and had a chat with @zivkan. I'll try to summarize that here. Turns out the
This means we cannot add a simple checkbox. I suggested that instead of having a combo box, we add a checkbox for "Enable NuGet package auditing" and have another to control "Error when vuln data cannot be obtained". It's too late in the cycle for 17.8 to ship this. The other issue we have in tooling this is that the values for @zivkan is going to explore the tooling side of this with the team and may revisit in 17.9. It's too late for us to realistically ship properties for 17.8 now anyway, unfortunately. We missed the window by a day sadly. |
From a basic customer point of view, I get that having a checkbox or dropdown is the simplest. From an intermediate or advanced .NET developer, it means it's not possible to specify "remove from my csproj and use feature default" vs "write this value in my csproj, so I'm protected from changing defaults". Maybe it's acceptable to require customers who want to do this to hand edit the csproj as XML. However, the problem from a NuGet team point of view, if we evaluate the default value in our props/targets, then it becomes difficult for us to determine the difference between "project did not specify a value" vs "project explicitly set the value the same as the default", meaning in our telemetry, we can't tell the difference. Knowing this might be useful for understanding product usage and making decisions about education, but it would be very useful if we ever want to change defaults, and need to know the impact on how many customers it will impact vs how many customers have explicitly set the value to the old default value and will therefore not be affected. Is there some other way we can tell the project properties windows what the default is, while still getting the semantic difference between "not set" and "set to the default value"? Or alternatively, get that semantic difference through NuGet's project nomination, if we do set the default value in evaluation via |
This is a general issue with the property pages. Fixing it would require quite a bit of work, including to the APIs that CPS provides for setting project properties.
Thinking out loud here, perhaps in a <PropertyGroup>
<_OriginalNuGetAuditMode>$(NuGetAuditMode)</_OriginalNuGetAuditMode>
<NuGetAuditMode Condition="'$(NuGetAuditMode)' == ''">direct</NuGetAuditMode>
</PropertyGroup> |
We removed the NU1905 (no vulnerability data) warning, so I haven't yet done anything about setting defaults in props/targets though. |
@zivkan is this on your radar for 17.9? Let's work together to provide a great tooling experience in VS for this feature. |
Thanks for the reminder. I created a tracking issue to get this done, and have already reached out to people who care more about telemetry than I do to see if they want to keep this "explicitly set" telemetry or not. If not, it becomes a trivial change to make. If they want to keep it, then it's work that will need to be scheduled, hopefully next month. |
The properties have been merged into NuGet just now. Hopefully tonight it will be merged into VS main branch, but it might take a few days depending on who is on support and when they click the button (auto-insertions still need manual approval) |
Summary
Sorry about the late notice. We've been so busy implementing, testing, and fixing bugs, this slipped my mind 😞. Anyway, in VS17.8, NuGet is shipping a feature called NuGetAudit: https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages
If it's too late to get project properties added for this in 17.8, that's fine with me, though I didn't actually talk to any managers so I don't know if they share my feeling.
Also, while project properties already has a section for "Package", all the settings there are related to making a package out of the project. NuGetAudit is for referenced packages, and is therefore relevant for all projects, including ones that do not get packed into nupkgs.
Anyway, NuGetAudit has 3 properties that customers can set:
NuGetAudit
true
(default),false
NuGetAuditMode
direct
(default),all
NuGetAuditLevel
low
(default),moderate
,high
,critical
I haven't actually looked at project properties in a long time (too used to hand editing the csproj). If it's possible to have a group heading, with a "Learn more" link, I think a link to the docs would be great.
User Impact
Increases discoverability into NuGetAudit, for customers who are unaware. Makes it easier to set and change values avoiding typos.
The text was updated successfully, but these errors were encountered: