Skip to content

Commit e724310

Browse files
Merge pull request #45596 from dotnet/main
Merge main into live
2 parents fd490f1 + 9f1267e commit e724310

File tree

26 files changed

+181
-156
lines changed

26 files changed

+181
-156
lines changed

.github/workflows/quest-bulk.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "bulk quest import"
22
on:
33
schedule:
4-
- cron: '0 10 * * *' # UTC time, that's 5:00 am EST, 2:00 am PST.
5-
- cron: '0 9 6 * *' # This is the morning of the 6th.
4+
- cron: '0 7 1-5,7-31 * *' # UTC time, that's 2:00 am EST, 11:00 pm PST.
5+
- cron: '0 7 6 * *' # This is the morning of the 6th.
66

77
workflow_dispatch:
88
inputs:
@@ -58,4 +58,4 @@ jobs:
5858
org: ${{ github.repository_owner }}
5959
repo: ${{ github.repository }}
6060
issue: '-1'
61-
duration: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.duration || github.event.schedule == '0 9 6 * *' && -1 || 5 }}
61+
duration: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.duration || github.event.schedule == '0 7 6 * *' && -1 || 5 }}

.openpublishing.redirection.core.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,10 @@
14211421
{
14221422
"source_path_from_root": "/docs/core/testing/unit-testing-with-nunit.md",
14231423
"redirect_url": "/dotnet/core/testing/unit-testing-csharp-with-nunit"
1424+
},
1425+
{
1426+
"source_path_from_root": "/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md",
1427+
"redirect_url": "/dotnet/core/compatibility/sdk/10.0/nugetaudit-transitive-packages"
14241428
}
14251429
]
14261430
}

docs/ai/quickstarts/includes/ai-templates-azure-openai.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,27 @@ After you install the AI app templates, you can use them to create starter apps
7070
7171
[!INCLUDE [ai-templates-explore-app](ai-templates-explore-app.md)]
7272
73-
## Create and configure the Azure OpenAI resource
73+
## Create and authenticate to the Azure OpenAI service
7474
75-
To use the .NET AI templates, you'll need to create and authenticate to an Azure OpenAI service:
75+
To use the .NET AI templates with Azure OpenAI, you'll need to create and authenticate to an Azure OpenAI service.
76+
77+
### Create the Azure OpenAI service
7678
7779
1. [Create an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) if you don't already have one available.
7880
79-
2. Deploy the `gpt-4o-mini` and `text-embedding-3-small` models to your Azure OpenAI Service resource. When creating those deployments, give them the same names as the models (`gpt-4o-mini` and `text-embedding-3-small`). To learn how to deploy a model, see [Create a resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) in the Azure OpenAI docs.
81+
1. Deploy the `gpt-4o-mini` and `text-embedding-3-small` models to your Azure OpenAI Service resource. When creating those deployments, give them the same names as the models (`gpt-4o-mini` and `text-embedding-3-small`) so that they match the default template values. To learn how to deploy a model, see [Create a resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) in the Azure OpenAI docs.
82+
83+
### Authenticate to the Azure OpenAI service
84+
85+
The AI template uses Microsoft Entra ID for seamless, keyless authentication. It leverages [`DefaultAzureCredential`](/dotnet/api/azure.identity.defaultazurecredential) to automatically detect and utilize credentials from your development tools when running locally. To connect to the service, ensure your developer account has the appropriate roles assigned and is signed in to your local development tools.
86+
87+
1. Assign a role to your developer account to access the Azure OpenAI resource:
8088
81-
3. The AI template is configured to use Microsoft Entra ID for keyless authentication. Configure the Azure OpenAI resource for keyless authentication:
89+
- In the Azure Portal, navigate to the overview page of your Azure OpenAI resource.
90+
- Select **Access control (IAM)** from the left navigation.
91+
- [Add a role assignment](/dotnet/azure/sdk/authentication/local-development-dev-accounts#assign-roles-to-the-group) for the `Azure AI Developer` role to your Azure account.
8292
83-
- In the Azure Portal, navigate to the overview page of your Azure OpenAI resource.
84-
- Select **Access control (IAM)** from the left navigation.
85-
- [Add a role assignment](/azure/developer/ai/keyless-connections) for the `Azure AI Developer` role to your Azure account.
93+
1. [Sign-in to a local development tool](/dotnet/azure/sdk/authentication/local-development-dev-accounts#sign-in-to-azure-using-developer-tooling) such as Visual Studio or the Azure CLI using the Azure account you assigned the `Azure AI Developer` role to.
8694
8795
## Configure the app
8896

docs/azure/includes/dotnet-all.md

Lines changed: 5 additions & 4 deletions
Large diffs are not rendered by default.

docs/azure/includes/dotnet-new.md

Lines changed: 5 additions & 4 deletions
Large diffs are not rendered by default.

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
5252
| Title | Type of change | Introduced version |
5353
|----------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
5454
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
55+
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
5556
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
5657
| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
5758
| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |

docs/core/compatibility/9.0.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
101101

102102
| Title | Type of change | Introduced version |
103103
|-------------------------------------------------------------------------------------------|---------------------|--------------------|
104-
| [`dotnet restore` audits transitive packages](sdk/9.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 6 |
105104
| [`dotnet sln add` doesn't allow invalid file names](sdk/9.0/dotnet-sln.md) | Behavioral change | 9.0.2xx |
106105
| [`dotnet watch` incompatible with Hot Reload for old frameworks](sdk/9.0/dotnet-watch.md) | Behavioral change | RC 1 |
107106
| [`dotnet workload` commands output change](sdk/9.0/dotnet-workload-output.md) | Behavioral change | Preview 1 |
Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,63 @@
1-
---
2-
title: "Breaking change: 'dotnet restore' audits transitive packages"
3-
description: Learn about a breaking change in the .NET 9 SDK where 'dotnet restore' also produces security vulnerability warnings for transitive packages by default.
4-
ms.date: 11/14/2024
5-
---
6-
# 'dotnet restore' audits transitive packages
7-
8-
The [`dotnet restore` command](../../../tools/dotnet-restore.md), which restores the dependencies and tools of a project, now produces security vulnerability warnings for transitive packages by default.
9-
10-
## Previous behavior
11-
12-
In .NET 8, [NuGetAudit](../8.0/dotnet-restore-audit.md) was introduced to emit warnings for packages with known security vulnerabilities. By default, only direct package references were audited, however, it was possible to change the `NuGetAuditMode` property to include all packages.
13-
14-
## New behavior
15-
16-
Starting in .NET 9, `NuGetAuditMode` defaults to `all` if it hasn't been explicitly set. This setting means that *transitive packages* (dependencies of packages your project directly references) with known vulnerabilities now cause warnings to be reported.
17-
If your project treats warnings as errors, this behavior can cause restore failures.
18-
19-
## Version introduced
20-
21-
.NET 9 Preview 6
22-
23-
## Type of breaking change
24-
25-
This change is a [behavioral change](../../categories.md#behavioral-change).
26-
27-
## Reason for change
28-
29-
Packages with known vulnerabilities might cause your app to be exploitable, even if your project does not directly reference or use the vulnerable package.
30-
New features in .NET 9 also make it easier to investigate the package graph and to suppress advisories that aren't relevant to how your app uses the vulnerable package.
31-
32-
## Recommended action
33-
34-
- To explicitly reduce the probability of this change breaking your build due to warnings, you can consider your usage of `<TreatWarningsAsErrors>` and use `<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>` to ensure known security vulnerabilities are still allowed in your environment.
35-
36-
- Use tools such as `dotnet nuget why` to find the top-level package that caused the transitive package with the known vulnerability to be included, and try to upgrade it to see if the transitive vulnerability goes away. If not, promote the transitive package to a top-level package by adding a `PackageReference` for it, and upgrade it to a newer version.
37-
38-
- If you want to suppress a specific advisory, you can add `<NuGetAuditSuppress Include="url" />` item to your project file, where `url` is the URL reported in NuGet's warning message.
39-
40-
```xml
41-
<ItemGroup>
42-
<NuGetAuditSuppress Include="url" />
43-
</ItemGroup>
44-
```
45-
46-
- If you want to only be warned of direct package references with known vulnerabilities, you can set `<NuGetAuditMode>` to `direct` in your project file.
47-
48-
```xml
49-
<PropertyGroup>
50-
<NuGetAuditMode>direct</NuGetAuditMode>
51-
</PropertyGroup>
52-
```
53-
54-
## See also
55-
56-
- [Audit for security vulnerabilities (`dotnet restore`)](../../../tools/dotnet-restore.md#audit-for-security-vulnerabilities)
57-
- [Auditing package dependencies for security vulnerabilities](/nuget/concepts/auditing-packages)
58-
- [NuGetAudit 2.0: Elevating Security and Trust in Package Management](https://devblogs.microsoft.com/nuget/nugetaudit-2-0-elevating-security-and-trust-in-package-management/)
1+
---
2+
title: "Breaking change: 'dotnet restore' audits transitive packages"
3+
description: Learn about a breaking change in the .NET 10 SDK where 'dotnet restore' also produces security vulnerability warnings for transitive packages by default.
4+
ms.date: 03/28/2025
5+
---
6+
# 'dotnet restore' audits transitive packages
7+
8+
The [`dotnet restore` command](../../../tools/dotnet-restore.md), which restores the dependencies of a project, now produces security vulnerability warnings for transitive packages by default when the project targets .NET 10 or a later version.
9+
10+
## Previous behavior
11+
12+
[NuGetAudit](../8.0/dotnet-restore-audit.md) was introduced in .NET 8 to emit warnings for packages with known security vulnerabilities.
13+
By default, only direct package references were audited, however, it was possible to change the `NuGetAuditMode` property to include all packages.
14+
15+
In .NET 9 preview 6, NuGetAuditMode's default was changed to `all` for all projects, and this change was reverted back to `direct` in the .NET 9.0.101 SDK.
16+
17+
## New behavior
18+
19+
When projects target .NET 10 or higher, then `NuGetAuditMode` defaults to `all` if it hasn't been explicitly set.
20+
This setting means that *transitive packages* (dependencies of packages your project directly references) with known vulnerabilities now cause warnings to be reported.
21+
If your project treats warnings as errors, this behavior can cause restore failures.
22+
23+
If your project targets .NET 9 or lower, the default for `NuGetAuditMode` remains `direct`.
24+
25+
## Version introduced
26+
27+
.NET 10 Preview 3
28+
29+
## Type of breaking change
30+
31+
This change is a [behavioral change](../../categories.md#behavioral-change).
32+
33+
## Reason for change
34+
35+
Packages with known vulnerabilities might cause your app to be exploitable, even if your project does not directly reference or directly use the vulnerable package.
36+
37+
## Recommended action
38+
39+
- To prevent audit warnings being treated as errors, even when using `<TreatWarningsAsErrors>`, you can use `<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904;$(WarningsNotAsErrors)</WarningsNotAsErrors>`.
40+
41+
- Use tools such as `dotnet nuget why` to find the top-level package that caused the transitive package with the known vulnerability to be included, and try to upgrade it to see if the transitive vulnerability goes away. If not, promote the transitive package to a top-level package by adding a `PackageReference` for it, and upgrade it to a newer version.
42+
43+
- If you want to suppress a specific advisory, you can add `<NuGetAuditSuppress Include="url" />` item to your project file, where `url` is the URL reported in NuGet's warning message.
44+
45+
```xml
46+
<ItemGroup>
47+
<NuGetAuditSuppress Include="url" />
48+
</ItemGroup>
49+
```
50+
51+
- If you want to only be warned of direct package references with known vulnerabilities, you can set `<NuGetAuditMode>` to `direct` in your project file.
52+
53+
```xml
54+
<PropertyGroup>
55+
<NuGetAuditMode>direct</NuGetAuditMode>
56+
</PropertyGroup>
57+
```
58+
59+
## See also
60+
61+
- [Audit for security vulnerabilities (`dotnet restore`)](../../../tools/dotnet-restore.md#audit-for-security-vulnerabilities)
62+
- [Auditing package dependencies for security vulnerabilities](/nuget/concepts/auditing-packages)
63+
- [NuGetAudit 2.0: Elevating Security and Trust in Package Management](https://devblogs.microsoft.com/nuget/nugetaudit-2-0-elevating-security-and-trust-in-package-management/)

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ items:
4242
href: globalization/10.0/version-override.md
4343
- name: SDK and MSBuild
4444
items:
45+
- name: "`dotnet restore` audits transitive packages"
46+
href: sdk/10.0/nugetaudit-transitive-packages.md
4547
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
4648
href: sdk/10.0/default-workload-config.md
4749
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
@@ -166,8 +168,6 @@ items:
166168
href: networking/9.0/query-redaction-logs.md
167169
- name: SDK and MSBuild
168170
items:
169-
- name: "`dotnet restore` audits transitive packages"
170-
href: sdk/9.0/nugetaudit-transitive-packages.md
171171
- name: "`dotnet sln add` doesn't allow invalid file names"
172172
href: sdk/9.0/dotnet-sln.md
173173
- name: "`dotnet watch` incompatible with Hot Reload for old frameworks"
@@ -1910,6 +1910,8 @@ items:
19101910
items:
19111911
- name: .NET 10
19121912
items:
1913+
- name: "`dotnet restore` audits transitive packages"
1914+
href: sdk/10.0/nugetaudit-transitive-packages.md
19131915
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
19141916
href: sdk/10.0/default-workload-config.md
19151917
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
@@ -1920,8 +1922,6 @@ items:
19201922
href: sdk/10.0/nu1510-pruned-references.md
19211923
- name: .NET 9
19221924
items:
1923-
- name: "`dotnet restore` audits transitive packages"
1924-
href: sdk/9.0/nugetaudit-transitive-packages.md
19251925
- name: "`dotnet sln add` doesn't allow invalid file names"
19261926
href: sdk/9.0/dotnet-sln.md
19271927
- name: "`dotnet watch` incompatible with Hot Reload for old frameworks"

docs/core/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The .NET platform has been designed to deliver productivity, performance, securi
2222
* **Adaptability across programming domains** (cloud, client, gaming) is enabled with specialized implementations of the general-purpose programming model.
2323
* **Industry standards** like OpenTelemetry and gRPC are favored over bespoke solutions.
2424

25-
.NET is maintained by Microsoft and the community. It is regularly updated to ensure users deploy secure and reliable applications to production.
25+
.NET is maintained collaboratively by Microsoft and a global community. Regular updates ensure users deploy secure and reliable applications to production environments.
2626

2727
## Components
2828

@@ -42,9 +42,9 @@ The core libraries expose thousands of types, many of which integrate with and f
4242

4343
Support for doing multiple things at the same time is fundamental to practically all workloads. That could be client applications doing background processing while keeping the UI responsive, services handling many thousands of simultaneous requests, devices responding to a multitude of simultaneous stimuli, or high-powered machines parallelizing the processing of compute-intensive operations. Asynchronous programming support is a first-class feature of the C# programming language, which provides the `async` and `await` keywords that make it easy to write and compose asynchronous operations while still enjoying the full benefits of all the control flow constructs the language has to offer.
4444

45-
The [type system](../standard/base-types/common-type-system.md) offers significant breadth, catering somewhat equally to safety, descriptiveness, dynamism, and native interop. First and foremost, the type system enables an object-oriented programming model. It includes types, (single base class) inheritance, interfaces (including default method implementations), and virtual method dispatch to provide a sensible behavior for all the type layering that object orientation allows. [Generic types](../standard/generics.md) are a pervasive feature that let you specialize classes to one or more types.
45+
The [type system](../standard/base-types/common-type-system.md) offers significant breadth, catering somewhat equally to safety, descriptiveness, dynamism, and native interop. First and foremost, the type system enables an object-oriented programming model. It includes types, (single base class) inheritance, interfaces (including default method implementations), and virtual method dispatch to provide a sensible behavior for all the type layering that object orientation allows. [Generic types](../standard/generics.md) are ubiquitous and let you specialize classes to one or more types.
4646

47-
The .NET runtime provides automatic memory management via a garbage collector. For any language, its memory management model is likely its most defining characteristic. This is true for .NET languages. .NET has a self-tuning, tracing GC. It aims to deliver "hands off" operation in the general case while offering configuration options for more extreme workloads. The current GC is the result of many years of investment and learnings from a multitude of workloads.
47+
The .NET runtime provides automatic memory management via a garbage collector. For any language, its memory management model is likely its most defining characteristic. This is true for .NET languages. .NET has a self-tuning, tracing GC. It aims to deliver "hands-off" use in the general case while offering configuration options for more extreme workloads. The current GC is the result of many years of investment and learnings from a multitude of workloads.
4848

4949
Value types and stack-allocated memory blocks offer more direct, low-level control over data and native platform interop, in contrast to .NET's GC-managed types. Most of the primitive types in .NET, like integer types, are value types, and users can define their own types with similar semantics. Value types are fully supported through .NET's generics system, meaning that generic types like `List<T>` can provide flat, no-overhead memory representations of value type collections.
5050

@@ -68,7 +68,7 @@ NuGet is the package manager for .NET. It contains hundreds of thousands of pack
6868

6969
.NET is [supported by multiple organizations](https://github.com/dotnet/core/blob/main/support.md) that work to ensure that .NET can run on [multiple operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md) and is kept up to date. It can be used on Arm64, x64, and x86 architectures.
7070

71-
New versions of .NET are released annually in November, per our [releases and support policies](releases-and-support.md). It is [updated monthly](https://github.com/dotnet/announcements/labels/Monthly-Update) on Patch Tuesday (second Tuesday), typically at 10AM Pacific time.
71+
New versions of .NET are released annually in November, per our [releases and support policies](releases-and-support.md). It is [updated monthly](https://github.com/dotnet/announcements/labels/Monthly-Update) on Patch Tuesday (second Tuesday), typically at 10 AM Pacific time.
7272

7373
## .NET ecosystem
7474

0 commit comments

Comments
 (0)