You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: accepted/2025/audit-sources-visual-studio-options.md
+21-26Lines changed: 21 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,54 +20,48 @@ Pain-points today:
20
20
### **Functional Explanation**
21
21
22
22
Add an **"Audit Sources"** table to the "Package Sources" page in NuGet's Visual Studio Options.
23
+
The audit source table will show the same columns as package sources:
24
+
**Warnings/Errors, Enabled, Name, Source, Allow Insecure Connections** (note that mockups may not reflect all columns).
23
25
24
26
-**Discoverability**: Enable Quick Search (Ctrl+Q) so that searching for "Audit Source" navigates to the Package Sources page in Unified Settings.
25
27
- Up to **Three Tables** can be shown in this order:
26
28
- Package Sources (always shown)
27
29
- Audit Sources (shown when explicitly configured),
28
30
- Machine-wide Package Sources (shown when explicitly configured)
29
-
- New dropdown: **Choose how NuGet Audit retrieves vulnerability data**
30
-
- Introduce a dropdown control to switch from **"Read vulnerabilities from my package sources"** to **"Configure sources to read vulnerabilities"**
31
-
- When an audit source is configured, the Audit Sources table appears.
32
-
- To configure the first audit source, select **"Configure sources to read vulnerabilities"**; this reveals the Audit Sources table.
31
+
- New Checkbox: **Use separate sources for vulnerability audit**
32
+
- Introduce a Checkbox control that when checked, shows a table for adding Audit Sources.
33
+

34
+
- At least 1 audit source must be added to persist the effect of this setting.
35
+
Otherwise, checking the box and closing VS and reopening this setting, the checkbox will now be unchecked since no audit sources are found.
36
+
- In a future iteration, checking the box may be able to automatically open the Add Audit Source dialog.
37
+
Unified Settings does not currently have this support.
38
+
- When none are configured, the Audit Sources table will be **hidden**.
39
+
- When one or more audit source is already configured, the Audit Sources table appears by default.
40
+
- The Checkbox is **disabled** and a message indicates how to go back to using Package Sources:
41
+
> "Remove all audit sources to revert to using package sources for vulnerability data."
42
+
- If customers want the ability to switch back from their audit sources to only package sources for Vulnerability data, a future iteration could support this and automatically clear `<auditSources>` after showing a warning Messagebox that can be cancelled.
33
43
34
-
#### Read vulnerabilities from my package sources
44
+
_Mockup_: Table of Audit Sources shown below Package Sources because Checkbox option "Use separate sources for vulnerability audit" is selected.
35
45
36
-
- Default option - if no audit sources exist, this will be the selection.
37
-
- Audit Sources table will be **hidden**.
46
+

38
47
39
-

40
-
41
-
#### Configure sources to read vulnerabilities
42
-
43
-
- Audit Sources table will be **shown**.
44
-
-**Pre-selected** when one or more audit sources are already configured.
45
-
- The dropdown will be disabled as well since the presence of audit sources takes away the behavior of reading vulnerability data from package sources.
46
-
-**User-selectable** only when no audit sources exist, enabling a customer to explicitly configure their first `<auditSource>` using the `Add` button.
47
-
48
-

49
-
50
-

51
-
52
-
- Switching the dropdown back to "**Read vulnerabilities from my package sources**" would not be supported in this iteration.
53
-
- If customers want the ability to switch back from their audit sources to only package sources for Vulnerability data, a future iteration could support this and automatically clear `<auditSources>` after showing a warning messagebox that can be cancelled.
54
48
55
49
#### Describe Package versus Audit sources
56
50
57
51
Before each table, introduce descriptive text to reinforce with customers how Package Sources and Audit Sources work together.
58
52
59
53
-**Package sources**:
60
-
61
-
> Configure the sources NuGet will use to for displaying and downloading packages. NuGet Audit will also reference vulnerability data from sources that support it. Alternatively, dedicated Audit Source(s) can be configured below.
54
+
> Package sources define where NuGet retrieves packages for install, restore, audit, and update operations. [Learn more about package sources](https://learn.microsoft.com/nuget/reference/nuget-config-file#packagesources)
62
55
63
56
-**Audit sources**:
64
57
65
-
> Configure the sources NuGet Audit will use for retrieving Package Vulnerability data. If none are configured, any configured package sources that support Vulnerability data will be used by NuGet Audit.
58
+
> Audit sources provide vulnerability data during restore with
59
+
out acting as package sources. If no audit sources are configured, NuGet Audit uses package sources and suppresses warning NU1905. [Learn more about audit sources](https://learn.microsoft.com/nuget/reference/nuget-config-file#auditsources)
66
60
67
61
### **Technical Explanation**
68
62
69
63
- Add an array setting titled "Audit Sources" to the "Package Sources" NuGet options page in the Unified Settings registration.json file.
70
-
- Make the "Audit Sources" array setting hidden unless the "Choose how NuGet Audit retrieves vulnerability data" value is "Configure sources to read vulnerabilities".
64
+
- Make the "Audit Sources" array setting hidden unless the "Use separate sources for vulnerability audit" value is `true` (Checked).
71
65
- Use existing NuGet.Configuration APIs to read/write `<auditSources>` in `nuget.config` files.
72
66
73
67
#### Telemetry
@@ -77,6 +71,7 @@ Before each table, introduce descriptive text to reinforce with customers how Pa
77
71
## **Drawbacks**
78
72
79
73
- Potential confusion for package sources that act as audit sources implicitly by having a vulnerability resource.
74
+
The Checkbox is an attempt to make this more clear, and we can measure its impact and feedback from customers.
0 commit comments