Skip to content

Commit cdb1d33

Browse files
committed
[jekyll] - Fix for vulnerability issue CVE-2024-46901
1 parent a035cf4 commit cdb1d33

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

src/jekyll/.devcontainer/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,32 @@ RUN chown -R "vscode:rvm" "/usr/local/rvm/" \
2525

2626
COPY post-create.sh /usr/local/post-create.sh
2727

28+
# Fixing vulnerability issue CVE-2024-46901 by upgrading svn to 1.14.5. Ref https://subversion.apache.org/security/CVE-2024-46901-advisory.txt
29+
RUN set -eux; \
30+
URL="https://archive.apache.org/dist/subversion/subversion-1.14.5.tar.gz"; \
31+
TMP="/tmp"; \
32+
TARBALL="subversion-1.14.5.tar.gz"; \
33+
SRCDIR="subversion-1.14.5"; \
34+
if wget -q -O "${TMP}/${TARBALL}" "${URL}"; then \
35+
echo "Downloaded ${TARBALL} — building..."; \
36+
apt-get remove -y subversion libsvn1 || true; \
37+
cd "${TMP}"; \
38+
tar -xzf "${TARBALL}"; \
39+
cd "${SRCDIR}"; \
40+
apt-get update -y; \
41+
apt-get install -y --no-install-recommends build-essential autoconf libtool pkg-config libapr1-dev libaprutil1-dev liblz4-dev libutf8proc-dev; \
42+
./configure --with-lz4=internal --prefix=/usr; \
43+
make -j"$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)"; \
44+
make install; \
45+
cd /; \
46+
rm -rf "${TMP:?}/${SRCDIR}" "${TMP:?}/${TARBALL}"; \
47+
apt-get purge -y --auto-remove build-essential autoconf libtool pkg-config; \
48+
rm -rf /var/lib/apt/lists/*; \
49+
echo "Subversion built and installed (build deps removed)"; \
50+
else \
51+
echo "Downloading svn source failed, skipping Subversion build"; \
52+
fi
53+
2854
# [Optional] Uncomment this section to install additional OS packages.
2955
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
3056
# && apt-get -y install --no-install-recommends <your-package-list-here>

src/jekyll/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.1.18",
2+
"version": "2.1.19",
33
"variants": [
44
"3.3-bookworm",
55
"3.3-bullseye"

src/jekyll/test-project/test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ check "git-location" sh -c "which git | grep /usr/local/bin/git"
2121
git_version=$(git --version)
2222
check-version-ge "git-requirement" "${git_version}" "git version 2.40.1"
2323

24+
# Testing vulnerability issue CVE-2024-46901 fix by upgrading svn to 1.14.5.
25+
svn_version=$(svn --version --quiet)
26+
check-version-ge "svn-requirement" "${svn_version}" "1.14.5"
27+
2428
check "set-git-config-user-name" sh -c "sudo git config --system user.name devcontainers"
2529
check "gitconfig-file-location" sh -c "ls /etc/gitconfig"
2630
check "gitconfig-contains-name" sh -c "cat /etc/gitconfig | grep 'name = devcontainers'"

0 commit comments

Comments
 (0)