mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
non-root glob patch test
This commit is contained in:
parent
5782832b82
commit
51673f8cdb
5 changed files with 26 additions and 0 deletions
|
|
@ -49,6 +49,10 @@ USER root
|
|||
# Install runtime dependencies
|
||||
RUN apk add --no-cache bash openssl tzdata nodejs npm python3 py3-pip
|
||||
|
||||
# Fix CVE-2025-64756: Update glob packages to patched versions (>=10.5.0 or >=11.1.0)
|
||||
# This patches the HIGH severity Command Injection vulnerability in glob CLI
|
||||
RUN npm update -g glob || true
|
||||
|
||||
WORKDIR /app
|
||||
# Copy the current directory contents into the container at /app
|
||||
COPY . .
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ WORKDIR /app
|
|||
# Install Node.js and npm (adjust version as needed)
|
||||
RUN apt-get update && apt-get install -y nodejs npm
|
||||
|
||||
# Fix CVE-2025-64756: Update glob packages to patched versions (>=10.5.0 or >=11.1.0)
|
||||
# This patches the HIGH severity Command Injection vulnerability in glob CLI
|
||||
RUN npm update -g glob || true
|
||||
|
||||
# Copy the UI source into the container
|
||||
COPY ./ui/litellm-dashboard /app/ui/litellm-dashboard
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ USER root
|
|||
# Install runtime dependencies
|
||||
RUN apk add --no-cache bash openssl tzdata nodejs npm python3 py3-pip libsndfile
|
||||
|
||||
# Fix CVE-2025-64756: Update glob packages to patched versions (>=10.5.0 or >=11.1.0)
|
||||
# This patches the HIGH severity Command Injection vulnerability in glob CLI
|
||||
RUN npm update -g glob || true
|
||||
|
||||
WORKDIR /app
|
||||
# Copy the current directory contents into the container at /app
|
||||
COPY . .
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
npm \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Fix CVE-2025-64756: Update glob packages to patched versions (>=10.5.0 or >=11.1.0)
|
||||
# This patches the HIGH severity Command Injection vulnerability in glob CLI
|
||||
RUN npm update -g glob || true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only necessary runtime files
|
||||
|
|
|
|||
|
|
@ -89,6 +89,14 @@ RUN prisma generate && \
|
|||
prisma --version && \
|
||||
prisma migrate diff --from-empty --to-schema-datamodel ./schema.prisma --script > /dev/null 2>&1 || true
|
||||
|
||||
RUN NPM_DIR=$(find /usr/lib/python3.13/site-packages -type d -path "*/node_modules/npm" 2>/dev/null | head -n 1) && \
|
||||
if [ -n "$NPM_DIR" ]; then \
|
||||
echo "Found npm at: $NPM_DIR"; \
|
||||
cd "$NPM_DIR" && npm update glob --depth 9999 || true; \
|
||||
else \
|
||||
echo "WARNING: Could not find nodejs_wheel npm directory"; \
|
||||
fi
|
||||
|
||||
# -----------------
|
||||
# Runtime Stage
|
||||
# -----------------
|
||||
|
|
@ -105,6 +113,8 @@ RUN for i in 1 2 3; do \
|
|||
apk add --no-cache python3 py3-pip bash openssl tzdata nodejs npm supervisor && break || sleep 5; \
|
||||
done
|
||||
|
||||
RUN npm update -g glob || true
|
||||
|
||||
# Copy artifacts from builder
|
||||
COPY --from=builder /app/requirements.txt /app/requirements.txt
|
||||
COPY --from=builder /app/docker/entrypoint.sh /app/docker/prod_entrypoint.sh /app/docker/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue