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
55# clear this environment variable so xml docs from NuGet packages are unpackaged. The default dotnet/sdk image sets it to 'skip'.
66# see https://github.com/dotnet/dotnet-docker/issues/2790
77ENV 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()
143143 check " code" which code
144144}
145145
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+
146155reportResults () {
147156 if [ ${# FAILED[@]} -ne 0 ]; then
148157 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
2727
2828check " usr-local-etc-config-does-not-exist" test ! -f " /usr/local/etc/gitconfig"
2929
30+ checkPackageVersion " pwsh" " 7.4.1" " PowerShell"
31+
3032# Report result
3133reportResults
You can’t perform that action at this time.
0 commit comments