Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ RUN apt-get install -y \
libcudnn8 libcudnn8-dev curl && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN apt-get update -y && apt-get install -y --only-upgrade ca-certificates && \
sed -i -e 's#^mozilla/emSign_ECC_Root_CA_-_G3.crt#!&#' \
-e 's#^mozilla/Comodo_AAA_Services_root.crt#!&#' /etc/ca-certificates.conf && \
update-ca-certificates --fresh && \
apt-get clean && rm -rf /var/lib/apt/lists/*
Comment on lines +26 to +30

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The certificate name for the Comodo AAA root in the Debian ca-certificates package is mozilla/AAA_Certificate_Services.crt, not mozilla/Comodo_AAA_Services_root.crt. Because of this, the sed command will not match the entry in /etc/ca-certificates.conf, and the defense-in-depth blocklist will fail to disable the Comodo AAA root if the package upgrade is not available (e.g., due to a stale mirror).

RUN apt-get update -y && apt-get install -y --only-upgrade ca-certificates && \
    sed -i -e 's#^mozilla/emSign_ECC_Root_CA_-_G3.crt#!&#' \
           -e 's#^mozilla/AAA_Certificate_Services.crt#!&#' /etc/ca-certificates.conf && \
    update-ca-certificates --fresh && \
    apt-get clean && rm -rf /var/lib/apt/lists/*


# Install ChromeDriver matching the installed Chromium version
RUN VER=$(curl -sf "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$(chromium --version | grep -oP '\d+' | head -1)") \
&& curl -sfL "https://storage.googleapis.com/chrome-for-testing-public/${VER}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip \
Expand Down Expand Up @@ -82,7 +88,7 @@ ENV SITE_ROOT=/code
COPY pyproject.toml Makefile ./

# Install UV using pip (no-cache so pip doesn't bloat the layer)
RUN pip install uv --no-cache-dir
RUN pip install --no-cache-dir --upgrade "pip>=26.2.2" "uv>=0.13.4"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since this command is run as the non-root user troc, attempting to upgrade pip globally without the --user flag can result in a PermissionError when pip tries to uninstall the existing system-wide pip installation. Adding the --user flag ensures that the upgraded pip and uv are installed in the user's home directory (/home/troc/.local/bin), which is already prepended to the PATH in the next line.

RUN pip install --no-cache-dir --user --upgrade "pip>=26.2.2" "uv>=0.13.4"

ENV PATH="/home/troc/.local/bin:$PATH"

# Create venv, install deps, and wipe uv cache — all in one layer so the
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ dependencies = [
# Flowtask + QuerySource and AI Parrot
"querysource",
#AI Parrot LLMS
"ai-parrot[llms]"
"ai-parrot[llms]",
"certifi>=2026.10.19"
]

[project.optional-dependencies]
Expand Down
Loading