Skip to content

Commit abb4087

Browse files
committed
- Rolled back some packages to the newest versions that don't include major version bumps for transitive packages.
- Left breadcrumbs indicating why we're including Azure.Core explicitly.
1 parent 4f159cc commit abb4087

File tree

10 files changed

+56
-10
lines changed

10 files changed

+56
-10
lines changed

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@
5555
<!-- Enable the project reference for debugging purposes. -->
5656
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
5757
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
58-
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
58+
<!--
59+
Azure.Core is explicitly referenced to avoid a transitive dependency on
60+
a vulnerable version via Azure.Identity.
61+
-->
5962
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
63+
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
6064
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
6165
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
6266
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,12 @@
969969
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
970970
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
971971
<PackageReference Condition="$(TargetGroup) == 'netcoreapp' " Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
972-
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
972+
<!--
973+
Azure.Core is explicitly referenced to avoid a transitive dependency on
974+
a vulnerable version via Azure.Identity.
975+
-->
973976
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
977+
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
974978
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
975979
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
976980
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@
3838
</PackageReference>
3939
</ItemGroup>
4040
<ItemGroup>
41-
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
41+
<!--
42+
Azure.Core is explicitly referenced to avoid a transitive dependency on
43+
a vulnerable version via Azure.Identity.
44+
-->
4245
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
46+
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
4347
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
4448
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
4549
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,12 @@
713713
</PackageReference>
714714
</ItemGroup>
715715
<ItemGroup>
716-
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
716+
<!--
717+
Azure.Core is explicitly referenced to avoid a transitive dependency on
718+
a vulnerable version via Azure.Identity.
719+
-->
717720
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
721+
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
718722
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
719723
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
720724
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />

src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<PackageReference Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsHostingVersion)" />
8787
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
8888
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
89+
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
8990
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
9091
<Reference Condition="'$(TargetGroup)'=='netfx'" Include="System.Transactions" />
9192
<PackageReference Include="System.Private.Uri" Version="$(SystemPrivateUriVersion)" />

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ExceptionTest/ConnectionExceptionTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,13 @@ public void NamedPipeInvalidConnStringTest()
144144
}
145145

146146
[Fact]
147-
[SkipOnTargetFramework(~(TargetFrameworkMonikers)0x4)]
147+
[SkipOnTargetFramework(
148+
// We had defined Uap to be 0x4 in our fork/copy of XUnitExtensions.
149+
// Now that we're using the NuGet package, I can't add enum members,
150+
// so I kept the functionality here by casting from the old raw
151+
// value. XUnitExtensions's TargetFrameworkMonikers currently only
152+
// includes enum values up to 0x2, so this is safe - for now.
153+
~(TargetFrameworkMonikers)0x4)]
148154
public static void LocalDBNotSupportedOnUapTest()
149155
{
150156
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(@$"server=(localdb)\{DataTestUtility.LocalDbAppName}")

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/LocalDBTest/LocalDBTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ private enum InfoType
2727
private static readonly string s_localDbNamedPipeConnectionString = @$"server={GetLocalDbNamedPipe()}";
2828

2929
#region LocalDbTests
30-
[SkipOnTargetFramework((TargetFrameworkMonikers)0x4)] // No Registry support on UAP
30+
[SkipOnTargetFramework(
31+
// We had defined Uap to be 0x4 in our fork/copy of XUnitExtensions.
32+
// Now that we're using the NuGet package, I can't add enum members,
33+
// so I kept the functionality here by casting from the old raw
34+
// value. XUnitExtensions's TargetFrameworkMonikers currently only
35+
// includes enum values up to 0x2, so this is safe - for now.
36+
(TargetFrameworkMonikers)0x4)] // No Registry support on UAP
3137
[ConditionalFact(nameof(IsLocalDBEnvironmentSet))]
3238
public static void SqlLocalDbConnectionTest()
3339
{

src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
<None Update="config.json">
1515
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1616
</None>
17+
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
1718
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
1819
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="$(AzureSecurityKeyVaultKeysVersion)" />
1920
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
2021
</ItemGroup>
21-
</Project>
22+
</Project>

tools/props/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<!-- NetFx and NetCore project dependencies -->
2929
<PropertyGroup>
3030
<AzureIdentityVersion>1.12.1</AzureIdentityVersion>
31-
<MicrosoftIdentityClientVersion>4.78.0</MicrosoftIdentityClientVersion>
31+
<MicrosoftIdentityClientVersion>4.76.0</MicrosoftIdentityClientVersion>
3232
<MicrosoftIdentityModelProtocolsOpenIdConnectVersion>6.35.0</MicrosoftIdentityModelProtocolsOpenIdConnectVersion>
3333
<MicrosoftIdentityModelJsonWebTokensVersion>6.35.0</MicrosoftIdentityModelJsonWebTokensVersion>
3434
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
@@ -55,8 +55,8 @@
5555
</PropertyGroup>
5656
<!-- AKV Provider project dependencies -->
5757
<PropertyGroup>
58-
<AzureCoreVersion>1.45.0</AzureCoreVersion>
59-
<AzureSecurityKeyVaultKeysVersion>4.7.0</AzureSecurityKeyVaultKeysVersion>
58+
<AzureCoreVersion>1.41.0</AzureCoreVersion>
59+
<AzureSecurityKeyVaultKeysVersion>4.6.0</AzureSecurityKeyVaultKeysVersion>
6060
<MicrosoftExtensionsCachingMemoryVersion>6.0.3</MicrosoftExtensionsCachingMemoryVersion>
6161
<SystemPrivateUriVersion>4.3.2</SystemPrivateUriVersion>
6262
</PropertyGroup>

tools/specs/Microsoft.Data.SqlClient.nuspec

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
2929
<dependencies>
3030
<group targetFramework="net462">
3131
<dependency id="Microsoft.Data.SqlClient.SNI" version="5.1.2" />
32+
<!--
33+
Azure.Core is explicitly referenced to avoid a transitive dependency
34+
on a vulnerable version via Azure.Identity.
35+
-->
3236
<dependency id="Azure.Core" version="1.45.0" />
3337
<dependency id="Azure.Identity" version="1.12.1" />
3438
<dependency id="Microsoft.Identity.Client" version="4.78.0" />
@@ -42,6 +46,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
4246
</group>
4347
<group targetFramework="net6.0">
4448
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.1.2" exclude="Compile" />
49+
<!--
50+
Azure.Core is explicitly referenced to avoid a transitive dependency
51+
on a vulnerable version via Azure.Identity.
52+
-->
4553
<dependency id="Azure.Core" version="1.45.0" />
4654
<dependency id="Azure.Identity" version="1.12.1" />
4755
<dependency id="Microsoft.Identity.Client" version="4.78.0" exclude="Compile"/>
@@ -58,6 +66,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
5866
</group>
5967
<group targetFramework="netstandard2.0">
6068
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.1.2" exclude="Compile" />
69+
<!--
70+
Azure.Core is explicitly referenced to avoid a transitive dependency
71+
on a vulnerable version via Azure.Identity.
72+
-->
6173
<dependency id="Azure.Core" version="1.45.0" />
6274
<dependency id="Azure.Identity" version="1.12.1" />
6375
<dependency id="Microsoft.Identity.Client" version="4.78.0" exclude="Compile"/>
@@ -76,6 +88,10 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
7688
</group>
7789
<group targetFramework="netstandard2.1">
7890
<dependency id="Microsoft.Data.SqlClient.SNI.runtime" version="5.1.2" exclude="Compile" />
91+
<!--
92+
Azure.Core is explicitly referenced to avoid a transitive dependency
93+
on a vulnerable version via Azure.Identity.
94+
-->
7995
<dependency id="Azure.Core" version="1.45.0" />
8096
<dependency id="Azure.Identity" version="1.12.1" />
8197
<dependency id="Microsoft.Identity.Client" version="4.78.0" exclude="Compile"/>

0 commit comments

Comments
 (0)