Skip to content

Commit d3514c6

Browse files
garyhampsonghamps-icimspotatoqualitee
authored
Updates to remediate CVE-2024-0056 and CVE-2023-36414 (#7)
* Updates to remediate CVE-2024-0056 and CVE-2023-36414 * version fixes * new binaries required --------- Co-authored-by: Gary Hampson <[email protected]> Co-authored-by: Chrissy LeMaire <[email protected]>
1 parent ae20f48 commit d3514c6

18 files changed

+46
-418
lines changed

build/build-core.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,21 @@ $parms = @{
104104
}
105105

106106
$parms.Name = "Microsoft.Data.SqlClient"
107-
$parms.RequiredVersion = "5.1.1"
107+
$parms.RequiredVersion = "5.1.4"
108108
$null = Install-Package @parms
109109

110110
$parms.Name = "Microsoft.Data.SqlClient.SNI.runtime"
111-
$parms.RequiredVersion = "5.1.0"
111+
$parms.RequiredVersion = "5.2.0"
112112
$null = Install-Package @parms
113113

114114
$parms.Name = "Microsoft.Identity.Client"
115115
$parms.RequiredVersion = "4.53.0"
116116
$null = Install-Package @parms
117117

118-
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.5.1.1/runtimes/unix/lib/net6.0/Microsoft.Data.SqlClient.dll" -Destination lib
119-
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.5.1.1/runtimes/win/lib/net6.0/Microsoft.Data.SqlClient.dll" -Destination lib/win-sqlclient/
118+
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.5.1.4/runtimes/unix/lib/net6.0/Microsoft.Data.SqlClient.dll" -Destination lib
119+
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.5.1.4/runtimes/win/lib/net6.0/Microsoft.Data.SqlClient.dll" -Destination lib/win-sqlclient/
120120
Copy-Item "$tempdir/nuget/Microsoft.Identity.Client.4.53.0/lib/net6.0/Microsoft.Identity.Client.dll" -Destination lib/win-sqlclient/ #Maybe this will be a problem, i dont know
121-
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.SNI.runtime.5.1.0/runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll" -Destination lib/win-sqlclient/
121+
Copy-Item "$tempdir/nuget/Microsoft.Data.SqlClient.SNI.runtime.5.2.0/runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll" -Destination lib/win-sqlclient/
122122

123123
Copy-Item ./temp/linux/* -Destination lib -Exclude (Get-ChildItem lib -Recurse) -Recurse -Include *.exe, *.config -Verbose
124124

@@ -161,6 +161,6 @@ if ($xmlpdb) {
161161
Remove-Item c:\gallery\dbatools.library\core\dbatools.library.psd1 -ErrorAction Ignore
162162
#Copy-Item C:\github\dbatools.library\dbatools.core.library.psd1 C:\github\dbatools.core.library
163163
164-
Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\*\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\fd0dde81152c4d4868afd88d727e78a9b6881cf4) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
164+
Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\*\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\1c735258e8b34ce113ad86a501235c1f2e263106) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
165165
}
166166
#>

build/build-full.ps1

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ $parms = @{
7979
}
8080

8181
$parms.Name = "Microsoft.Data.SqlClient"
82-
$parms.RequiredVersion = "5.1.1"
82+
$parms.RequiredVersion = "5.1.4"
8383
$null = Install-Package @parms
8484

8585
$parms.Name = "Microsoft.Data.SqlClient.SNI.runtime"
86-
$parms.RequiredVersion = "5.1.0"
86+
$parms.RequiredVersion = "5.2.0"
8787
$null = Install-Package @parms
8888

8989
$parms.Name = "Microsoft.Identity.Client"
9090
$parms.RequiredVersion = "4.53.0"
9191
$null = Install-Package @parms
9292

9393
Copy-Item "$tempdir\nuget\Microsoft.Identity.Client.4.53.0\lib\net461\Microsoft.Identity.Client.dll" -Destination lib/
94-
Copy-Item "$tempdir\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.1.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/
94+
Copy-Item "$tempdir\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.2.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/
9595

9696

9797
Copy-Item "./var/misc/core/*.dll" -Destination ./lib/
@@ -106,17 +106,27 @@ Get-ChildItem -Directory -Path .\lib\ | Where-Object Name -notin 'x64', 'x86' |
106106
if ((Get-ChildItem -Path C:\gallery\dbatools.library -ErrorAction Ignore)) {
107107
$null = Remove-Item C:\gallery\dbatools.library -Recurse
108108
$null = mkdir C:\gallery\dbatools.library
109+
$null = mkdir C:\gallery\dbatools.library\desktop
110+
$null = mkdir C:\gallery\dbatools.library\desktop\lib
111+
#$null = mkdir C:\gallery\dbatools.library\desktop\x86
112+
#$null = mkdir C:\gallery\dbatools.library\desktop\x64
109113
$null = robocopy c:\github\dbatools.library C:\gallery\dbatools.library /S /XF actions-build.ps1 .markdownlint.json *.psproj* *.git* *.yml *.md dac.ps1 build*.ps1 dbatools-core*.* /XD .git .github Tests .vscode project temp runtime runtimes replication var opt | Out-String | Out-Null
110114

111115
Remove-Item c:\gallery\dbatools.library\dac.ps1 -ErrorAction Ignore
112116
Remove-Item c:\gallery\dbatools.library\dbatools.core.library.psd1 -ErrorAction Ignore
113117
Copy-Item C:\github\dbatools.library\dbatools.library.psd1 C:\gallery\dbatools.library
118+
Move-Item C:\github\dbatools.library\lib\x86 C:\gallery\dbatools.library\desktop\lib
119+
Move-Item C:\github\dbatools.library\lib\x64 C:\gallery\dbatools.library\desktop\lib
120+
Move-Item C:\github\dbatools.library\lib\* C:\gallery\dbatools.library\desktop\*
121+
Remove-Item C:\gallery\dbatools.library\lib -Recurse
114122

115-
$null = Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\fd0dde81152c4d4868afd88d727e78a9b6881cf4) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
123+
124+
#$null = Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\1c735258e8b34ce113ad86a501235c1f2e263106) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
116125
}
117126

118127
Import-Module C:\gallery\dbatools.library\dbatools.library.psd1 -Force
119128
Pop-Location
129+
# gotta copy the integration dlls
120130
<#
121131
already there
122132
-rwxrwxrwx ctrlb ctrlb 10/08/2022 03:08 12132752 Microsoft.Data.Tools.Schema.Sql.dll

build/build-local.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,31 +99,31 @@ $parms.RequiredVersion = "170.7.0-preview"
9999
#Install-Package @parms
100100

101101
$parms.Name = "Microsoft.Data.SqlClient"
102-
$parms.RequiredVersion = "5.0.1"
102+
$parms.RequiredVersion = "5.1.4"
103103
#Install-Package @parms
104104

105105
$parms.Name = "Microsoft.Data.SqlClient.SNI.runtime"
106-
$parms.RequiredVersion = "5.0.1"
106+
$parms.RequiredVersion = "5.2.0"
107107
#Install-Package @parms
108108

109109
$parms.Name = "Microsoft.Identity.Client"
110-
$parms.RequiredVersion = "4.45.0"
110+
$parms.RequiredVersion = "4.53.0"
111111
#Install-Package @parms
112112

113113
$parms.Name = "Microsoft.SqlServer.Server"
114114
$parms.RequiredVersion = "1.0.0"
115115
#Install-Package @parms
116116

117117
$parms.Name = "Azure.Identity"
118-
$parms.RequiredVersion = "1.6.0"
118+
$parms.RequiredVersion = "1.10.3"
119119
#Install-Package @parms
120120

121-
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.5.0.1\runtimes\unix\lib\netcoreapp3.1\Microsoft.Data.SqlClient.dll" -Destination lib/net6.0/publish
122-
Copy-Item "C:\temp\nuget\Microsoft.Identity.Client.4.45.0\lib\net461\Microsoft.Identity.Client.dll" -Destination lib/net462/publish/
123-
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.5.0.1\runtimes\win\lib\netcoreapp3.1\Microsoft.Data.SqlClient.dll" -Destination lib/net6.0/publish/win-sqlclient
124-
Copy-Item "C:\temp\nuget\Microsoft.Identity.Client.4.45.0\lib\netcoreapp2.1\Microsoft.Identity.Client.dll" -Destination lib/net6.0/publish/win-sqlclient
125-
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.0.1\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/net6.0/publish/win-sqlclient
126-
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.0.1\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/net462/publish/
121+
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.5.1.4\runtimes\unix\lib\netcoreapp3.1\Microsoft.Data.SqlClient.dll" -Destination lib/net6.0/publish
122+
Copy-Item "C:\temp\nuget\Microsoft.Identity.Client.4.53.0\lib\net461\Microsoft.Identity.Client.dll" -Destination lib/net462/publish/
123+
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.5.1.4\runtimes\win\lib\netcoreapp3.1\Microsoft.Data.SqlClient.dll" -Destination lib/net6.0/publish/win-sqlclient
124+
Copy-Item "C:\temp\nuget\Microsoft.Identity.Client.4.53.0\lib\netcoreapp2.1\Microsoft.Identity.Client.dll" -Destination lib/net6.0/publish/win-sqlclient
125+
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.2.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/net6.0/publish/win-sqlclient
126+
Copy-Item "C:\temp\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.2.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/net462/publish/
127127

128128
Copy-Item "replication/*.dll" -Destination lib/net462/publish/
129129
Copy-Item "replication/*.dll" -Destination lib/net6.0/publish/

0 commit comments

Comments
 (0)