Skip to content

Commit 65d4020

Browse files
authored
build: fix cross-span and setuptools CVEs (#2107)
Fixes CVE-2024-21538 and CVE-2024-6345 . b/430729479 * use python:3.10.18-bullseye for PHP base to fix Kokoro failure
1 parent 41c499c commit 65d4020

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

docker/owlbot/nodejs/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
5858
apt-get install -y nodejs && \
5959
rm -rf /var/lib/apt/lists/*
6060

61+
# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
62+
RUN rm -r /usr/lib/node_modules/npm/node_modules/cross-spawn
63+
6164
# Verify Node.js and npm installations
6265
RUN node --version
6366
RUN npm --version
@@ -82,6 +85,7 @@ RUN pip install --require-hashes -r /synthtool/requirements.txt
8285
# since it does not include a fix for CVE-2025-47273/CVE-2025-47273.
8386
RUN rm -rf /venv/synthtool/lib/python3.13/site-packages/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl
8487
RUN rm -rf /venv/synthtool/lib/python3.13/site-packages/virtualenv/seed/wheels/embed/setuptools-75.1.0-py3-none-any.whl
88+
RUN rm -rf /opt/venv/synthtool/lib/python3.13/site-packages/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl
8589

8690
# Set PYTHONPATH to ensure synthtool can be found by Python scripts.
8791
# Include the virtual environment's site-packages for completeness, though

docker/owlbot/php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# build from the root of this repo:
1818
# docker build -t gcr.io/repo-automation-bots/owlbot-php -f docker/owlbot/php/Dockerfile .
19-
FROM python:3.10.6-buster
19+
FROM python:3.10.18-bullseye
2020

2121
WORKDIR /
2222

docker/owlbot/php/container_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ commandTests:
1717
- name: "python"
1818
command: "python"
1919
args: ["--version"]
20-
expectedOutput: ["Python 3.10.6"]
20+
expectedOutput: ["Python 3.10.18"]
2121
- name: "php synthtool validation"
2222
command: "python"
2323
# Use YAML List Style for this command

0 commit comments

Comments
 (0)