File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,12 @@ ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools
5
5
# clear this environment variable so xml docs from NuGet packages are unpackaged. The default dotnet/sdk image sets it to 'skip'.
6
6
# see https://github.com/dotnet/dotnet-docker/issues/2790
7
7
ENV NUGET_XMLDOC_MODE=
8
+
9
+ # Temporary: Upgrade packages due to mentioned CVEs
10
+ # They are installed by the base image (mcr.microsoft.com/dotnet/sdk) which does not have the patch.
11
+ # https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0057
12
+ RUN apt-get update && \
13
+ wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb && \
14
+ dpkg -i powershell_7.4.1-1.deb_amd64.deb && \
15
+ apt-get install -f && \
16
+ rm powershell_7.4.1-1.deb_amd64.deb
Original file line number Diff line number Diff line change @@ -143,6 +143,15 @@ checkCommon()
143
143
check " code" which code
144
144
}
145
145
146
+ checkPackageVersion ()
147
+ {
148
+ PACKAGE=$1
149
+ REQUIRED_VERSION=$2
150
+ PACKAGE_NAME=$3
151
+ current_version=$( " ${PACKAGE} " -V | grep -E " ^${PACKAGE_NAME} \s" | awk ' {print $2}' )
152
+ check-version-ge " ${PACKAGE_NAME} -requirement" " ${current_version} " " ${REQUIRED_VERSION} "
153
+ }
154
+
146
155
reportResults () {
147
156
if [ ${# FAILED[@]} -ne 0 ]; then
148
157
echoStderr -e " \n💥 Failed tests: ${FAILED[@]} "
Original file line number Diff line number Diff line change @@ -27,5 +27,7 @@ check "gitconfig-contains-name" sh -c "cat /etc/gitconfig | grep 'name = devcont
27
27
28
28
check " usr-local-etc-config-does-not-exist" test ! -f " /usr/local/etc/gitconfig"
29
29
30
+ checkPackageVersion " pwsh" " 7.4.1" " PowerShell"
31
+
30
32
# Report result
31
33
reportResults
You can’t perform that action at this time.
0 commit comments