Skip to content

Commit d3aea3e

Browse files
authored
[5.1] Dependency Cleanup (#3838)
1 parent 69a924e commit d3aea3e

File tree

25 files changed

+194
-91
lines changed

25 files changed

+194
-91
lines changed

.github/workflows/codeql.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "release/5.1" ]
17+
pull_request:
18+
branches: [ "release/5.1" ]
19+
schedule:
20+
- cron: '33 23 * * 6'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: csharp
47+
build-mode: manual
48+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
49+
# Use `c-cpp` to analyze code written in C, C++ or both
50+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
51+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
52+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
53+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
54+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
55+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
- name: Setup .NET Core SDK
61+
uses: actions/setup-dotnet@v5.0.1
62+
with:
63+
global-json-file: global.json
64+
65+
# Initializes the CodeQL tools for scanning.
66+
- name: Initialize CodeQL
67+
uses: github/codeql-action/init@v4
68+
with:
69+
languages: ${{ matrix.language }}
70+
build-mode: ${{ matrix.build-mode }}
71+
# If you wish to specify custom queries, you can do so here or in a config file.
72+
# By default, queries listed here will override any specified in a config file.
73+
# Prefix the list here with "+" to use these queries and those in the config file.
74+
75+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
76+
# queries: security-extended,security-and-quality
77+
78+
# If the analyze step fails for one of the languages you are analyzing with
79+
# "We were unable to automatically build your code", modify the matrix above
80+
# to set the build mode to "manual" for that language. Then modify this step
81+
# to build your code.
82+
# ℹ️ Command-line programs to run using the OS shell.
83+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
84+
- name: Run manual build steps
85+
if: matrix.build-mode == 'manual'
86+
shell: bash
87+
run: |
88+
mkdir packages
89+
dotnet build src/Microsoft.Data.SqlClient.sln
90+
91+
- name: Perform CodeQL Analysis
92+
uses: github/codeql-action/analyze@v4
93+
with:
94+
category: "/language:${{matrix.language}}"

eng/pipelines/libraries/mds-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ variables:
2121
- name: LocalMdsMinor
2222
value: 1
2323
- name: LocalMdsPatch
24-
value: 8
24+
value: 9
2525
- name: Packaging.EnableSBOMSigning
2626
value: true
2727

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.416"
4+
}
5+
}

src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<ItemGroup>
3333
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
3434
<PackageReference Include="System.Private.Uri" Version="$(SystemPrivateUriVersion)" />
35-
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
3635
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="$(AzureSecurityKeyVaultKeysVersion)" />
3736
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
3837
</ItemGroup>

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,12 @@
4242
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
4343
<Compile Include="Microsoft.Data.SqlClient.NetStandard.cs" />
4444
</ItemGroup>
45-
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
46-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
47-
</ItemGroup>
4845
<ItemGroup>
4946
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
5047
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
5148
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
5249
<PackageReference Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
53-
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
5450
<PackageReference Include="Microsoft.Data.SqlClient.SNI.runtime" Version="$(MicrosoftDataSqlClientSniRuntimeVersion)" />
55-
<!-- Enable the project reference for debugging purposes. -->
56-
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
5751
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
5852
<!--
5953
Azure.Core is explicitly referenced to avoid a transitive dependency on
@@ -65,5 +59,6 @@
6559
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
6660
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
6761
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
62+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
6863
</ItemGroup>
6964
</Project>

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@
408408
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlInternalTransaction.cs">
409409
<Link>Microsoft\Data\SqlClient\SqlInternalTransaction.cs</Link>
410410
</Compile>
411-
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlMetadataFactory.cs">
412-
<Link>Microsoft\Data\SqlClient\SqlMetadataFactory.cs</Link>
411+
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlMetaDataFactory.cs">
412+
<Link>Microsoft\Data\SqlClient\SqlMetaDataFactory.cs</Link>
413413
</Compile>
414414
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs">
415415
<Link>Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs</Link>
@@ -963,12 +963,8 @@
963963
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
964964
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
965965
<PackageReference Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
966-
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
967966
<PackageReference Include="Microsoft.Data.SqlClient.SNI.runtime" Version="$(MicrosoftDataSqlClientSniRuntimeVersion)" />
968-
<!-- Enable the project reference for debugging purposes. -->
969-
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
970967
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
971-
<PackageReference Condition="$(TargetGroup) == 'netcoreapp' " Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
972968
<!--
973969
Azure.Core is explicitly referenced to avoid a transitive dependency on
974970
a vulnerable version via Azure.Identity.
@@ -982,6 +978,7 @@
982978
<PackageReference Include="System.Runtime.Caching" Version="$(SystemRuntimeCachingVersion)" />
983979
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
984980
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
981+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
985982
</ItemGroup>
986983
<Import Project="$(ToolsDir)targets\GenerateThisAssemblyCs.targets" />
987984
<Import Project="$(ToolsDir)targets\ResolveContract.targets" Condition="'$(OSGroup)' == 'AnyOS'" />

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
4949
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
5050
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
51-
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
52-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
51+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
5352
</ItemGroup>
5453
</Project>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,7 @@
723723
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
724724
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
725725
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
726-
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
727-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
726+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
728727
</ItemGroup>
729728

730729
<!-- For compilation targeting .NET Framework using .NET SDKs. -->

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DBConnectionString.cs renamed to src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DbConnectionString.cs

File renamed without changes.

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,7 @@ internal byte[] GetBytes(object o, out Format format, out int maxSize)
29982998
// You must not change the guid for this coclass
29992999
// or the iid for the ISQLDebug interface
30003000
//
3001-
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDebugging.xml' path='docs/members[@name="SQLDebugging"]/SQLDebugging/*'/>
3001+
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SQLDebugging.xml' path='docs/members[@name="SQLDebugging"]/SQLDebugging/*'/>
30023002
[
30033003
ComVisible(true),
30043004
ClassInterface(ClassInterfaceType.None),

0 commit comments

Comments
 (0)